foobara 0.0.25 → 0.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -1
- data/projects/command/src/concerns/errors_type.rb +3 -0
- data/projects/command_connectors/src/command_connector/commands/query_git_commit_info.rb +0 -4
- data/projects/common/src/error.rb +1 -1
- data/projects/common/src/runtime_error.rb +1 -1
- data/projects/value/src/data_error.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74ed1cc03610fe5533258dc181f0874db18119716a193820aa3b227c4c70646f
|
4
|
+
data.tar.gz: 30f4d98511c5842e55b66a184952b19514dab9a18b0a86d14c4a708becaa758f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d4fc1f0de283351f4aeefbf8467c3fe77a66122e7621db77a086578ee4958cf0402ef158781ca1790326ad94d8dd1f8f5ff1f773ce3e6f1b3d393ef9313a0bc
|
7
|
+
data.tar.gz: c79c5217ae9463cf8139d065165f5c7e3508eedbd21a468c4d3e9059f49754c16fde5352cbd2f4a6ad55faa6a7a866a1db6e436dc24820831da14e431c0edbb1
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
|
-
## [0.0.
|
1
|
+
## [0.0.26] - 2024-12-03
|
2
2
|
|
3
|
+
- Add error defaults for message and context
|
4
|
+
- Support registering possible runtime errors by symbol
|
3
5
|
- Make sure errors created via Command.possible_*error are namespaced to that command
|
4
6
|
- Allow passing all Error subclass parameters into possible_*error calls
|
5
7
|
- Allow creating entity types from declaration without model_module
|
@@ -35,6 +35,9 @@ module Foobara
|
|
35
35
|
# :nocov:
|
36
36
|
elsif arg.is_a?(::Class) && arg < Foobara::Error
|
37
37
|
PossibleError.new(arg)
|
38
|
+
elsif arg.is_a?(::Symbol)
|
39
|
+
error_class = Foobara::RuntimeError.subclass(mod: self, symbol: arg)
|
40
|
+
PossibleError.new(error_class, symbol: arg)
|
38
41
|
else
|
39
42
|
# :nocov:
|
40
43
|
raise ArgumentError, "Expected a PossibleError or an Error but got #{arg}"
|
@@ -16,7 +16,7 @@ module Foobara
|
|
16
16
|
end
|
17
17
|
|
18
18
|
# TODO: why path instead of runtime path?
|
19
|
-
def initialize(message: nil, symbol: nil, context:
|
19
|
+
def initialize(message: nil, symbol: nil, context: {}, path: nil)
|
20
20
|
args = { message:, symbol:, context:, path: }.compact
|
21
21
|
super(**args.merge(category: self.class.category))
|
22
22
|
end
|
@@ -7,7 +7,7 @@ module Foobara
|
|
7
7
|
end
|
8
8
|
end
|
9
9
|
|
10
|
-
def initialize(message: nil, symbol: nil, context:
|
10
|
+
def initialize(message: nil, symbol: nil, context: {}, path: nil)
|
11
11
|
args = { message:, symbol:, context:, path: }.compact
|
12
12
|
super(**args.merge(category: self.class.category))
|
13
13
|
end
|