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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5fb5d2b28ef8ba9e3da543ec36508c787129dde4
4
- data.tar.gz: 9ab0133e5ab9652fcd839462fd975101f6b02412
3
+ metadata.gz: 3266a17da684f25bd01c80b4eae98640f3ce763b
4
+ data.tar.gz: c1441813b3c44a20c3a422dae58e6a08b3a97afc
5
5
  SHA512:
6
- metadata.gz: c52e070829b42091dcbe13c22ecca0d6bafd70c5b838855b0994f71ce93ca3a1463f1f704755d09c73443e4ea865fa378aaac0e7d68192b554cb68d8aa32540b
7
- data.tar.gz: '058b90d8a1c4ca8ef9c8aff3bf9836dd02da977d2899d9a9ee1e1b5ba1b1a1679534bce9eec37cabf0cb36dde0b7dac0ffa8c92208300f7d9f6d4811091ca5dd'
6
+ metadata.gz: 852936586c6248fce518e7e585516358bc123edeef5844e18abfda00b6c69203f7951c245d12ead5ad0f54cd38207eaa1b5a6787b1cef0eba25e9bf022136fa0
7
+ data.tar.gz: 344b25b63470bf84f2eae24772adaadf3fcd726495818164e298de17139d1087ace93bd77b41e9fc5b7abf3c33390f6ddb8d1bd0acbad527d88be69b10d4a842
@@ -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
- method_file, method_line = signature.method.source_location
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,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sorbet-runtime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4347
4
+ version: 0.4.4348
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe