l43_core 0.2.3 → 0.2.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee9cdeab020aa5876a85d6634206ce6ef106e0c1eefeb924753f2dfa8df1cbca
4
- data.tar.gz: d8ff86f355848b818aee9ca43e5c3641f72dda441ee2bf050e11983c16197147
3
+ metadata.gz: 5a5999d04d4f7f2f971a6d8f26361eaaf9779bf566fc3f59601ba421b02a30f4
4
+ data.tar.gz: c5b6bcc73627a82539e2f224b9af034d1da5712bae1bd955929e12a24deab16c
5
5
  SHA512:
6
- metadata.gz: b8197be7b6b633cc7d69712d03db1f578b0ca6cd7c13d05882228c4d06f296d5d128fbb01da3735ec811b6318d49f335347c7d2e757be653fe6c39560dfdc332
7
- data.tar.gz: 85ddf2ebdf2da119776fe575d1acc2f61e41098826cfd921ca306544c7710ff3ca5ae4c0a42859e3b2301d26c50f2347aafb5b2f5dc6ed3d791720b04b819f0f
6
+ metadata.gz: 2bf55edd1fa913aedc386b9afcc9e7c4578ec095e0196c040ced198ef5d0464363a940f8cb511827d551d752ea3a38f4c12ac8ca42b4cf9ed2476e3db8d52f18
7
+ data.tar.gz: 1f05cc991b243630208f3a812432840ecf07116fc39decfbd576b22e3b186a88b3ff57df0b47aff645bf8a65da6153301246acb3f909fbd7751d52d18abfe555
@@ -9,12 +9,12 @@ module L43
9
9
  by.include self
10
10
  end
11
11
 
12
- def as_result(caller: nil, &blk)
12
+ def as_result(name=nil, caller: nil, &blk)
13
13
  Success.new(blk.())
14
14
  rescue StandardError => se
15
15
  Failure.new(
16
16
  exception: se,
17
- message: se.inspect,
17
+ message: [se.inspect, name, "at #{blk.source_location}"].compact.join("\n"),
18
18
  location: [caller, se.backtrace_locations.first].compact.join(" ")
19
19
  )
20
20
  end
@@ -15,8 +15,8 @@ module L43
15
15
  blk.(self)
16
16
  end
17
17
 
18
- def map_result(&blk)
19
- as_result('map_result') do
18
+ def map_result(name='map_result', &blk)
19
+ as_result(name) do
20
20
  blk.(self)
21
21
  end
22
22
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module L43
4
4
  module Core
5
- VERSION = "0.2.3"
5
+ VERSION = "0.2.4"
6
6
  end
7
7
  end
8
8
  # SPDX-License-Identifier: AGPL-3.0-or-later
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: l43_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Dober