evt-try 0.2.0.0 → 0.2.1.0

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: d0b33cdd270953b0ef4737d4db55d2d060bbd865
4
- data.tar.gz: 28a5139ed85f60b4697f8712d5582cdf07cfcdb7
3
+ metadata.gz: 4918e02f488831286de87dcaf423680bde46c232
4
+ data.tar.gz: d12d4c58717f4146d5137edd965ee6ce695ceb31
5
5
  SHA512:
6
- metadata.gz: 2cdf78fcfba7d6dbc760e45f3216894df4f10351c49c05b457ea686e8e253cf25c05dff14ad2735c7218affb2c4c20e72bf604eb534ff68510e6bfe481c2cd34
7
- data.tar.gz: c4cb78f8fffecc22ca517be5f7cd235b350f814dd67dea13dc1ecc850b89f7f751b61875078bacb584f0b526eb6b25d86ae920fd1ac115c8117e4a095053800d
6
+ metadata.gz: 4204e453d36eed9a0228aefb80673b7ce2127f67990239bed187b9110dbf0e6c8a428a79041f275e34f8076752231d19ec59f38a514750251bb9c6a310b5d7f3
7
+ data.tar.gz: b4fe9b6b4a347dfd57c56bad63b4d3a9e44744723730bd28e6d11d60b33711e1585799a7f66a34090bc7feb7e9d32da48861f8ed613bd1db2b2595f2e1bd97d0
@@ -0,0 +1 @@
1
+ require 'try/controls/error'
@@ -0,0 +1,6 @@
1
+ module Try
2
+ module Controls
3
+ class ErrorA < RuntimeError; end
4
+ class ErrorB < ErrorA; end
5
+ end
6
+ end
@@ -1,5 +1,5 @@
1
1
  module Try
2
- def self.call(*errors, &action)
2
+ def self.call(*errors, error_probe: nil, &action)
3
3
  success = false
4
4
 
5
5
  begin
@@ -13,6 +13,8 @@ module Try
13
13
  end
14
14
  end
15
15
 
16
- success
16
+ error_probe.call(e) unless error_probe.nil?
17
+
18
+ return success
17
19
  end
18
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evt-try
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.0
4
+ version: 0.2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Eventide Project
@@ -31,6 +31,8 @@ extensions: []
31
31
  extra_rdoc_files: []
32
32
  files:
33
33
  - lib/try.rb
34
+ - lib/try/controls.rb
35
+ - lib/try/controls/error.rb
34
36
  - lib/try/try.rb
35
37
  homepage: https://github.com/eventide-project/try
36
38
  licenses: