sorbet-runtime 0.4.4347 → 0.4.4348
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/types/configuration.rb +1 -8
- data/lib/types/private/methods/call_validation.rb +6 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3266a17da684f25bd01c80b4eae98640f3ce763b
|
4
|
+
data.tar.gz: c1441813b3c44a20c3a422dae58e6a08b3a97afc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 852936586c6248fce518e7e585516358bc123edeef5844e18abfda00b6c69203f7951c245d12ead5ad0f54cd38207eaa1b5a6787b1cef0eba25e9bf022136fa0
|
7
|
+
data.tar.gz: 344b25b63470bf84f2eae24772adaadf3fcd726495818164e298de17139d1087ace93bd77b41e9fc5b7abf3c33390f6ddb8d1bd0acbad527d88be69b10d4a842
|
data/lib/types/configuration.rb
CHANGED
@@ -175,14 +175,7 @@ module T::Configuration
|
|
175
175
|
end
|
176
176
|
|
177
177
|
private_class_method def self.call_validation_error_handler_default(signature, opts)
|
178
|
-
|
179
|
-
location = opts[:location]
|
180
|
-
|
181
|
-
error_message = "#{opts[:kind]}#{opts[:name] ? " '#{opts[:name]}'" : ''}: #{opts[:message]}\n" \
|
182
|
-
"Caller: #{location.path}:#{location.lineno}\n" \
|
183
|
-
"Definition: #{method_file}:#{method_line}"
|
184
|
-
|
185
|
-
raise TypeError.new(error_message)
|
178
|
+
raise TypeError.new(opts[:pretty_message])
|
186
179
|
end
|
187
180
|
|
188
181
|
def self.call_validation_error_handler(signature, opts)
|
@@ -1150,10 +1150,16 @@ module T::Private::Methods::CallValidation
|
|
1150
1150
|
def self.report_error(method_sig, error_message, kind, name, type, value, caller_offset: 0)
|
1151
1151
|
method_sig.mark_failed
|
1152
1152
|
caller_loc = T.must(caller_locations(3 + caller_offset, 1))[0]
|
1153
|
+
definition_file, definition_line = method_sig.method.source_location
|
1154
|
+
|
1155
|
+
pretty_message = "#{kind}#{name ? " '#{name}'" : ''}: #{error_message}\n" \
|
1156
|
+
"Caller: #{caller_loc.path}:#{caller_loc.lineno}\n" \
|
1157
|
+
"Definition: #{definition_file}:#{definition_line}"
|
1153
1158
|
|
1154
1159
|
T::Private::ErrorHandler.handle_call_validation_error(
|
1155
1160
|
method_sig,
|
1156
1161
|
message: error_message,
|
1162
|
+
pretty_message: pretty_message,
|
1157
1163
|
kind: kind,
|
1158
1164
|
name: name,
|
1159
1165
|
type: type,
|