paradocs 1.1.5 → 1.1.6

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: ba77710f31f4b6d12c2c764807c1274a7409e18f
4
- data.tar.gz: 79e70eed1f40fbc5b2c7fab32b935ecee813b7b8
3
+ metadata.gz: fcffa38b327e138205c221b0161f777bb59674f9
4
+ data.tar.gz: ce6d34f0dbcbba84201e0c37b12eea7b9804c353
5
5
  SHA512:
6
- metadata.gz: 2365143b9765af228b14ed88105837d34fdba6b3da914e7cf71750e6bea120d6418767b7cd94678480b97ab7735af049129c3c180a6f46d7d590630d09f0d490
7
- data.tar.gz: eae4b0b0593f473ac51fc5214bef19c8571490cde4a63b6274a755fc81c1099c226030eaeec56eb15eb91e4263062c57d0c31bf7c50bd01038ef3371c7382031
6
+ metadata.gz: 5d18214752279c15cf66860f9f7e1b5cd3e57eb75b0160458713dca4b11c6b72712c33719e327de0443d7d40a2d481a5c6221fcdabaaf2db7098d648c178551f
7
+ data.tar.gz: 174ccfe6062589625e67642005134216cf03a821ac95af07ccdd4336a083023d98bbf61afd88907c3bf7a6b954dc8ef52d80b45467c2126935b4bbd1578b8aaf
@@ -132,7 +132,11 @@ module Paradocs
132
132
  context.add_error e.message
133
133
  rescue StandardError => e
134
134
  raise e if policy.is_a? Paradocs::Schema # from the inner level, just reraise
135
- raise ConfigurationError.new("#{e.class} should be registered in the policy") if Paradocs.config.explicit_errors
135
+ if Paradocs.config.explicit_errors
136
+ error = ConfigurationError.new("<#{e.class}:#{e.message}> should be registered in the policy")
137
+ error.set_backtrace(e.backtrace)
138
+ raise error
139
+ end
136
140
  context.add_error policy.message unless Paradocs.config.explicit_errors
137
141
  [value, false]
138
142
  end
@@ -1,3 +1,3 @@
1
1
  module Paradocs
2
- VERSION = "1.1.5"
2
+ VERSION = "1.1.6"
3
3
  end
@@ -81,7 +81,7 @@ describe 'custom block validator' do
81
81
 
82
82
  it "catches unregistered error and raises Configuration error" do
83
83
  expect { schema.resolve(age: 101).errors }.to raise_error(Paradocs::ConfigurationError)
84
- .with_message("ZeroDivisionError should be registered in the policy")
84
+ .with_message("<ZeroDivisionError:divided by 0> should be registered in the policy")
85
85
  end
86
86
  end
87
87
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paradocs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.5
4
+ version: 1.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maxim Tkachenko
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-11-23 00:00:00.000000000 Z
12
+ date: 2020-12-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler