Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] In Perl_eval_pv rethrow error via croak_sv() #17035

Closed
p5pRT opened this issue Jun 4, 2019 · 5 comments
Closed

[PATCH] In Perl_eval_pv rethrow error via croak_sv() #17035

p5pRT opened this issue Jun 4, 2019 · 5 comments

Comments

@p5pRT
Copy link

p5pRT commented Jun 4, 2019

Migrated from rt.perl.org#134175 (status was 'pending release')

Searchable as RT134175$

@p5pRT
Copy link
Author

p5pRT commented Jun 4, 2019

From @pali

This would allow to rethrow object exceptions.

@p5pRT
Copy link
Author

p5pRT commented Jun 4, 2019

From @pali

0001-In-Perl_eval_pv-rethrow-error-via-croak_sv.patch
From bebfd33414d628b7ba38c51b8c5896d607df8557 Mon Sep 17 00:00:00 2001
From: Pali <pali@cpan.org>
Date: Tue, 4 Jun 2019 12:28:09 +0200
Subject: [PATCH] In Perl_eval_pv rethrow error via croak_sv()

This would allow to rethrow object exceptions.
---
 perl.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/perl.c b/perl.c
index f2de4795cb..92f5373cf8 100644
--- a/perl.c
+++ b/perl.c
@@ -3231,8 +3231,7 @@ Perl_eval_pv(pTHX_ const char *p, I32 croak_on_error)
     if (croak_on_error) {
 	SV * const errsv = ERRSV;
 	if(SvTRUE_NN(errsv))
-	    /* replace with croak_sv? */
-	    Perl_croak_nocontext("%s", SvPV_nolen_const(errsv));
+            croak_sv(errsv);
     }
 
     return sv;
-- 
2.11.0

@p5pRT
Copy link
Author

p5pRT commented Jun 5, 2019

From @tonycoz

On Tue, 04 Jun 2019 03​:30​:17 -0700, pali@​cpan.org wrote​:

This would allow to rethrow object exceptions.

Thanks, applied as 0f4fe36.

I added tests in 1768639.

Tony

@p5pRT
Copy link
Author

p5pRT commented Jun 5, 2019

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jun 5, 2019

@tonycoz - Status changed from 'open' to 'pending release'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant