Skip to content

Instantly share code, notes, and snippets.

@ugexe
Last active March 8, 2021 23:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ugexe/69beaf9406463e922c3287cb567c2a08 to your computer and use it in GitHub Desktop.
Save ugexe/69beaf9406463e922c3287cb567c2a08 to your computer and use it in GitHub Desktop.
diff --git a/src/core.c/Supply-factories.pm6 b/src/core.c/Supply-factories.pm6
index 775cf694e..d77d18642 100644
--- a/src/core.c/Supply-factories.pm6
+++ b/src/core.c/Supply-factories.pm6
@@ -211,9 +211,10 @@
tap($t);
},
-> \value {
- my \result = try &!mapper(value);
- if $! {
- quit($!);
+ my $error;
+ my \result = try { CATCH { default { $error = $_ } }; &!mapper(value) };
+ if $error {
+ quit($error);
self!cleanup($cleaned-up, $source-tap);
}
else {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment