Skip to content

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

Closed

Description

@p5pRT

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

Searchable as RT134175$

Activity

  1. p5pRT commented on Jun 4, 2019

    @p5pRT
    Author

    From @pali

    This would allow to rethrow object exceptions.

  2. p5pRT commented on Jun 4, 2019

    @p5pRT
    Author

    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
    
    
  3. p5pRT commented on Jun 5, 2019

    @p5pRT
    Author

    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

  4. p5pRT commented on Jun 5, 2019

    @p5pRT
    Author

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

  5. p5pRT commented on Jun 5, 2019

    @p5pRT
    Author

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions