[perl #131167] [JVM] Newly-added NQP test for catching exceptions fails on JVM

2019-04-17 Thread Christian Bartolomaeus via RT
I have committed https://github.com/perl6/nqp/commit/59d7a8869c and this test passes now. As far as I understand, the right handler was missed when moving to the outside, because unwind_check sets the outer handler to 0 by default if no outer handler is passed. We do the latter now. I'm closin

Re: exceptions in threads

2018-11-10 Thread Brian Duggan
Oh, great! I was running the latest version I saw listed in 'rakudobrew list-available' which is 2018.10: ~ $ perl6 -v This is Rakudo version 2018.10 built on MoarVM version 2018.10 implementing Perl 6.c. thanks! Brian On Saturday, November 10, Elizabeth Mattijsen wrote: > In v6.d

Re: exceptions in threads

2018-11-10 Thread Elizabeth Mattijsen
In v6.d this throws the exception: $ 6 'start die("bye"); sleep 1' Unhandled exception in code scheduled on thread 4 bye in code at -e line 1 whereas the exception is silently ignored in 6.c: $ 6 'use v6.c; start die("bye"); sleep 1' Not sure if this answers your question, as it is unclear

exceptions in threads

2018-11-10 Thread Brian Duggan
Hi Perl 6 Users, What's the best way to know that an exception occurred in another thread, e.g. $ perl6 -e 'start say("hi"); sleep 1' hi $ but $ perl6 -e 'start die("bye"); sleep 1' $ I thought maybe $*SCHEDULER.uncaught_handler would help out here, but it didn't seem to.

Re: Catching exceptions in expressions

2018-08-03 Thread Patrick R. Michaud
t;>> > >>> Not having written much exception-related code in Perl 6, I hoped that > >>> this might work: > >>> > >>>sub divide($a, $b) { die "Zero denominator" if $b == 0; $a / $b } > >>>my $quotient = do { divide($

Re: Catching exceptions in expressions

2018-08-03 Thread Elizabeth Mattijsen
far as I can tell, the value to which a CATCH >>> block evaluates is ignored; the only useful things one can do in such a >>> block are things with side effects. Long story short, I eventually came up >>> with this: >>> >>>my $quotient = do { my $q; {

Re: Catching exceptions in expressions

2018-08-03 Thread Patrick R. Michaud
> my $quotient = do { my $q; { $q = divide($a, $b); CATCH { default { $q > > = -1 } } }; $q }; > > > > That's far more verbose than I've come to expect from Perl 6. Is there > > some more concise way of expressing this logic? > > > > The doc

Re: Catching exceptions in expressions

2018-08-03 Thread Simon Proctor
ul things one can do in such a > block are things with side effects. Long story short, I eventually came up > with this: > > my $quotient = do { my $q; { $q = divide($a, $b); CATCH { default { $q > = -1 } } }; $q }; > > That's far more verbose than I've come to expect

Catching exceptions in expressions

2018-08-03 Thread Sean McAfee
sing this logic? The doc page on exceptions mentions try, eg: my $quotient = try { divide($a, $b) } // -1; That works in this specific case, but it seems insufficient in general. The function might validly return an undefined value, and this construction can't distinguish between that a

[perl #129234] [CONC] `.hyper` and `.race` resume after exceptions

2017-10-18 Thread jn...@jnthn.net via RT
On Thu, 08 Sep 2016 12:55:10 -0700, sml...@gmail.com wrote: > If you `die` inside a `map/for` that is being `hyper/race`d... > > for (1..1).hyper { die }; sleep 1; say "Alive"; > > ...it prints the exception's backtrace, but then resumes the program > as if nothing had happened: > > Died > i

[perl #129234] [CONC] `.hyper` and `.race` resume after exceptions

2017-10-18 Thread jn...@jnthn.net via RT
On Thu, 08 Sep 2016 12:55:10 -0700, sml...@gmail.com wrote: > If you `die` inside a `map/for` that is being `hyper/race`d... > > for (1..1).hyper { die }; sleep 1; say "Alive"; > > ...it prints the exception's backtrace, but then resumes the program > as if nothing had happened: > > Died > i

[perl #131504] [LTA] .&foo form differs from foo($_) when routine throws control exceptions

2017-06-03 Thread via RT
# New Ticket Created by Zoffix Znet # Please include the string: [perl #131504] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=131504 > I assumed the .&foo form was just a nicer way of writing foo($_), however they differ in

[perl #131118] [RFC][@LARRY] Implement a way to propagate exceptions in Junctions

2017-05-05 Thread Zoffix Znet via RT
no problem with Failures in a Junctions, they work as any other value. The actual explosion in OP's code happens when one of the Failures—created when 'flarg' was coerced to Numeric—is used as a value for the purposes of evaluating the `==` op with it. That's when the Exception get

[perl #131118] [RFC][@LARRY] Implement a way to propagate exceptions in Junctions

2017-05-05 Thread Zoffix Znet via RT
no problem with Failures in a Junctions, they work as any other value. The actual explosion in OP's code happens when one of the Failures—created when 'flarg' was coerced to Numeric—is used as a value for the purposes of evaluating the `==` op with it. That's when the Exception get

[perl #131167] [JVM] Newly-added NQP test for catching exceptions fails on JVM

2017-04-17 Thread via RT
# New Ticket Created by Zoffix Znet # Please include the string: [perl #131167] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=131167 > I had to fudge it for the release and will unfudge after the release. The test tests if a

[perl #126787] [CONC] Promises that are not awaited or .then'd will swallow exceptions.

2016-12-13 Thread Zoffix Znet via RT
On Wed, 02 Dec 2015 13:52:24 -0800, timo wrote: > just about an exception in a > Promise that nobody is interested in (no await, no .then, ...) are > silently nommed: This version has a `.then` but doesn't explode. Is it meant to then? use v6; my $foo; my $promise = Promise.new; $

[perl #125782] [CONC] Uncaught exceptions in start { } blocks get no backtrace when raised via await

2016-11-02 Thread jn...@jnthn.net via RT
On Mon Aug 10 14:20:34 2015, r...@hoelz.ro wrote: > See the attached script. > > The original backtrace of an exception seems to vanish when awaiting a > Promise throws that exception. Now we show both backtraces, and more clearly explain what happened (that we're throwing now because the result

[perl #129234] [CONC] `.hyper` and `.race` resume after exceptions

2016-09-08 Thread via RT
# New Ticket Created by Sam S. # Please include the string: [perl #129234] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=129234 > If you `die` inside a `map/for` that is being `hyper/race`d... for (1..1).hyper { die };

[perl #128470] [BUG] Certain Exceptions Crash REPL

2016-06-23 Thread via RT
# New Ticket Created by Zoffix Znet # Please include the string: [perl #128470] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=128470 > Hi, I've tracked this issue to this commit: https://github.com/rakudo/rakudo/commit/6b93

[perl #127977] [BUG] Constraint on a slurpy MAIN parameter leaks out internal exceptions

2016-04-29 Thread Christian Bartolomaeus via RT
For the records: There is a test for this ticket (currently fudged 'todo') in S06-other/main-usage.t

Re: [perl #127977] AutoReply: [BUG] Constraint on a slurpy MAIN parameter leaks out internal exceptions

2016-04-24 Thread Tadeusz Sośnierz
s out internal exceptions", a summary of which appears below. There is no need to reply to this message right now. Your ticket has been assigned an ID of [perl #127977]. Please include the string: [perl #127977] in the subject line of all future correspondence about this issue. To

[perl #127977] [BUG] Constraint on a slurpy MAIN parameter leaks out internal exceptions

2016-04-24 Thread via RT
# New Ticket Created by Tadeusz Sośnierz # Please include the string: [perl #127977] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=127977 > $ cat test.pl sub MAIN(@args where sub { False }) { say ":)" } $ perl6 test.pl

[perl #125621] Uncaught exceptions in Supply.tap are silenced

2015-11-24 Thread jn...@jnthn.net via RT
On Wed Jul 15 21:09:12 2015, r...@hoelz.ro wrote: > See the attached file. > > The code in the attached file should make some indication that > something in the code called provided to Supply.tap is going wrong, > but the execution completes silently. The exceptions got lost due

[perl #125782] Uncaught exceptions in start { } blocks get no backtrace when raised via await

2015-08-10 Thread via RT
# New Ticket Created by Rob Hoelz # Please include the string: [perl #125782] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=125782 > See the attached script. The original backtrace of an exception seems to vanish when awaiti

[perl #125657] Rethrowing of exceptions by print_exception in src/core/Exception.pm doesn't preserve stacktrace

2015-07-20 Thread via RT
# New Ticket Created by Rob Hoelz # Please include the string: [perl #125657] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=125657 > For an example, see the attached script. I understand that if the if $! { ... } block is hi

[perl #125621] Uncaught exceptions in Supply.tap are silenced

2015-07-15 Thread via RT
# New Ticket Created by Rob Hoelz # Please include the string: [perl #125621] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=125621 > See the attached file. The code in the attached file should make some indication that somet

[perl6/specs] 0da73b: Add StubCode to exceptions

2015-06-07 Thread GitHub
-setting-library/Exception.pod Log Message: --- Add StubCode to exceptions

[perl #62086] ~ in regexes shouldn't cause thrown exceptions

2015-05-12 Thread Carl Mäsak via RT
On Mon May 11 05:26:45 2015, pmichaud wrote: > After discussion with jnthn at OSDC.no, here's what we propose: > > In the regex engine, the default FAILGOAL behavior should be to simply > fail/backtrack. This would be the default behavior for (rakudo) > Cursor as well. > > Grammars that wish to

[perl #62086] ~ in regexes shouldn't cause thrown exceptions

2015-01-21 Thread Carl Mäsak via RT
as an author of grammars, I still find it annoying and difficult that grammars generally fail, that is, return a failing match -- *unless* you use the `~` combinator, in which case they nqp::die with an exception that can't be properly caught using a CATCH. in effect, that gives grammars three

[perl6/specs] 2be530: (S32/Exceptions) Add X::Range::InvalidArg excepti...

2013-03-18 Thread GitHub
-setting-library/Exception.pod Log Message: --- (S32/Exceptions) Add X::Range::InvalidArg exception.

[perl6/specs] 4d51ab: force exceptions to lc or uc

2012-07-24 Thread GitHub
-setting-library/Str.pod Log Message: --- force exceptions to lc or uc

[perl6/specs] a0d5a9: A couple of fixes to the exceptions spec.

2012-03-08 Thread GitHub
-control.pod Log Message: --- A couple of fixes to the exceptions spec.

Re: [perl #106832] [BUG] Failure objects don't expose their underlying exceptions, except by re-throwing them

2011-12-22 Thread Moritz Lenz
Now fixed, and tested in t/spec/S04-exceptions/fail.t On 12/22/2011 04:13 PM, Carl MXXsak (via RT) wrote: > # New Ticket Created by "Carl Mäsak" > # Please include the string: [perl #106832] > # in the subject line of all future correspondence about this issue. > # https

[perl #106832] [BUG] Failure objects don't expose their underlying exceptions, except by re-throwing them

2011-12-22 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #106832] # in the subject line of all future correspondence about this issue. # https://rt.perl.org:443/rt3/Ticket/Display.html?id=106832 > wow, it seems that nom's Failure doesn't expose the underlying exception, except

[perl6/specs] 12c8b5: [S32::Exceptions] briefly describe the default exc...

2011-12-19 Thread noreply
-setting-library/Exception.pod Log Message: --- [S32::Exceptions] briefly describe the default exception printer

[perl #69991] Exceptions from io.pir not being properly thrown

2011-10-08 Thread Will Coleda via RT
chdir still isn't throwing a CATCHable error. It now lives in src/core/IO.pm proto sub chdir(|$) { * } multi sub chdir($path as Str) { try { pir::new__PS('OS').chdir($path) } $! ?? fail($!) !! True } -- Will "Coke" Coleda

[perl #69160] Twin exceptions cause assertion failure and/or unrequested error message

2011-09-19 Thread Will Coleda via RT
On Wed Sep 16 02:56:54 2009, moritz wrote: > Thanks for the ticket, it's a very good catch and analysis. > I have some small comments on it: > > Bruce Gray (via RT) wrote: > > # New Ticket Created by Bruce Gray > > # Please include the string: [perl #69160] > > # in the subject line of all futu

[perl6/specs] f30cc8: cmp does not throw exceptions, just fails

2011-07-06 Thread noreply
-operators.pod Log Message: --- cmp does not throw exceptions, just fails Also discuss "mass production" ops that tend to pass failures through rather than throw them. Which ops are so considered is of course a matter for ongoing negotiation.

[perl6/specs] e84b11: eval() does not catch exceptions

2011-06-30 Thread noreply
-functions.pod Log Message: --- eval() does not catch exceptions

[perl6/specs] 15b1a4: [S32/Exceptions] add a few syntax errors

2011-05-08 Thread noreply
/Exception.pod Log Message: --- [S32/Exceptions] add a few syntax errors

[perl6/specs] a29e38: [S32/Exceptions] move %.payload into a separate cl...

2011-05-04 Thread noreply
/Exception.pod Log Message: --- [S32/Exceptions] move %.payload into a separate class, based on feedback by sorear++

[perl #75620] some exceptions throw you out of the rakudo shell

2010-08-17 Thread Will Coleda via RT
On Tue Jun 08 12:33:03 2010, cognominal wrote: > I golfed the problematic statement to : > > $ perl6 > > lc ~$_ for Match.^methods > > lc ~$_ for Match.^methods > get_string() not implemented in class 'ArrayIterator' > $ say "my mac is freaking me out" # oops I was thrown out from the > rakudo

r31691 -[S04] more bombastic utterances about not dropping pending exceptions

2010-07-14 Thread pugs-commits
Author: lwall Date: 2010-07-15 01:53:05 +0200 (Thu, 15 Jul 2010) New Revision: 31691 Modified: docs/Perl6/Spec/S04-control.pod Log: [S04] more bombastic utterances about not dropping pending exceptions Modified: docs/Perl6/Spec/S04-control.pod

[perl #75620] some exceptions throw you out of the rakudo shell

2010-06-08 Thread via RT
# New Ticket Created by Stephane Payrard # Please include the string: [perl #75620] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=75620 > I golfed the problematic statement to : $ perl6 > lc ~$_ for Match.^methods > lc

[perl #75292] Exceptions make the REPL segfault

2010-05-25 Thread via RT
# New Ticket Created by Moritz Lenz # Please include the string: [perl #75292] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=75292 > Everything that produces an exception (doesn't matter if compile time or run time) makes

[perl #69991] Exceptions from io.pir not being properly thrown

2009-10-24 Thread via RT
# New Ticket Created by Mark Montague # Please include the string: [perl #69991] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=69991 > Exceptions from src/builtins/io.pir (and possibly elsewhere) are not being prope

Re: [perl #69160] Twin exceptions cause assertion failure and/or unrequested error message

2009-09-16 Thread Moritz Lenz
Thanks for the ticket, it's a very good catch and analysis. I have some small comments on it: Bruce Gray (via RT) wrote: > # New Ticket Created by Bruce Gray > # Please include the string: [perl #69160] > # in the subject line of all future correspondence about this issue. > # http://rt.perl.o

[perl #69160] Twin exceptions cause assertion failure and/or unrequested error message

2009-09-16 Thread via RT
# New Ticket Created by Bruce Gray # Please include the string: [perl #69160] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=69160 > Consider these two classes, both faulty in the same way: class B0rk { say $.a };

[perl #68318] [BUG] use exceptions not handled correctly within try block

2009-08-08 Thread via RT
# New Ticket Created by Ben Petering # Please include the string: [perl #68318] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=68318 > # "Normal" exception in try {} is caught BEGIN { try { widdle; CA

Re: Exceptions question

2009-02-26 Thread Timothy S. Nelson
l unthrown exceptions in the block, does it throw every one of them? in sequence? autothreading? what happens if one CATCH handles one of the exception but only an outer CATCH handles the other? I'm not sure there is a sane way of having several unthrown exceptions at the same block, so I think th

Re: Exceptions question

2009-02-26 Thread Daniel Ruoso
Em Qui, 2009-02-26 às 08:55 -0300, Daniel Ruoso escreveu: > for @! {} > might provide the needed semantics... After sending this mail I've just realized I don't know exactly which are the needed semantics... what happens if you have several unthrown exceptions in the block, doe

Re: Exceptions question

2009-02-26 Thread Daniel Ruoso
uld be sane to have $! representing the last exception, so you can still use my $file = open 'file.txt' or die $!; no matter how many unthrown exceptions you have in that block. daniel

Re: Exceptions question

2009-02-26 Thread Timothy S. Nelson
On Thu, 26 Feb 2009, Timothy S. Nelson wrote: My suggested solution would be to change $! to an exception container object. But then we have to use it in the implicit given in the CATCH block. If we used an any() Junction, would that do what we want? Ok, Moritz told me on IRC that this won

Re: Exceptions question

2009-02-26 Thread Timothy S. Nelson
also: : Because the contextual variable C<$!> contains all exceptions collected in : the current lexical scope... ...that implies to my mind that $! is an exception object, but that an exception object can contain more than one exception. Is that correct? But the spec also

Re: Exceptions question

2009-02-25 Thread Larry Wall
On Thu, Feb 26, 2009 at 02:05:28PM +1100, Timothy S. Nelson wrote: > Does this mean that $! is a container of some sort? It's an object, which (in the abstract) can contain anything it jolly well pleases. The main question beyond that is how it responds if used like one of the standard cont

Exceptions question

2009-02-25 Thread Timothy S. Nelson
S04 says: Because the contextual variable C<$!> contains all exceptions collected in the current lexical scope, saying C will throw all exceptions, whether they were handled or not. A bare C/C takes C<$!> as the default argument. Does this mean that $! is a conta

[perl #57978] Implement last/redo/next/continue control exceptions

2008-12-24 Thread Patrick R. Michaud via RT
On Thu Oct 23 07:13:46 2008, pmichaud wrote: > On Wed, Oct 22, 2008 at 08:27:10PM -0700, Tim Nelson via RT wrote: > > On Sat Aug 16 07:29:31 2008, je...@perl.org wrote: > > > - Needs last/redo/next/continue exceptions in PCT (PCT) > > > > > > This is done

[perl #57978] Implement last/redo/next/continue control exceptions

2008-12-24 Thread Patrick R. Michaud via RT
On Thu Oct 23 07:13:46 2008, pmichaud wrote: > On Wed, Oct 22, 2008 at 08:27:10PM -0700, Tim Nelson via RT wrote: > > On Sat Aug 16 07:29:31 2008, je...@perl.org wrote: > > > - Needs last/redo/next/continue exceptions in PCT (PCT) > > > > > > This is done

[perl #60556] Exceptions from C-level MULTI functions break subs

2008-11-16 Thread via RT
# New Ticket Created by Christoph Otto # Please include the string: [perl #60556] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=60556 > If an exception handler catches an exception from a MULTI function implemented in C,

Re: [perl #57978] Implement last/redo/next/continue control exceptions

2008-10-23 Thread Patrick R. Michaud
On Wed, Oct 22, 2008 at 08:27:10PM -0700, Tim Nelson via RT wrote: > On Sat Aug 16 07:29:31 2008, [EMAIL PROTECTED] wrote: > > - Needs last/redo/next/continue exceptions in PCT (PCT) > > > This is done in rakudo; does that mean that this ticket is done? Only 'next&#x

[perl #57978] Implement last/redo/next/continue control exceptions

2008-10-23 Thread Tim Nelson via RT
On Sat Aug 16 07:29:31 2008, [EMAIL PROTECTED] wrote: > - Needs last/redo/next/continue exceptions in PCT (PCT) This is done in rakudo; does that mean that this ticket is done?

[perl #57610] [PATCH] Resumable exceptions

2008-09-07 Thread Christoph Otto via RT
On Tue Aug 05 04:09:14 2008, tene wrote: > pdd23: > > Exception handlers can resume execution immediately after the > "throw" opcode by invoking the resume continuation which is stored > in the exception object. That continuation must be invoked with no > parameters; in other words, "throw" never

Re: [perl #58176] [PATCH] dotnet exceptions

2008-09-03 Thread chromatic
On Wednesday 20 August 2008 12:48:27 Reini Urban wrote: > make dotnet work with the new exceptions. > I'm not sure how to return the jump_point correctly, but it looks fine. Thanks, applied as r30718. -- c

[perl #46823] [TODO] [Pir] Rewrite Resizeable*Array tests properly when exceptions are implemented

2008-09-02 Thread Christoph Otto via RT
On Wed Aug 27 22:49:37 2008, cotto wrote: > > Most of these test wouldn't throw an exception anyway, since assigning > to a positive out-of-bounds element simply resizes the array. (This > excludes nonsensically large positive indicies, which should probably > tested for.) I added exception hand

[perl #46823] [TODO] [Pir] Rewrite Resizeable*Array tests properly when exceptions are implemented

2008-08-28 Thread Christoph Otto via RT
On Thu Oct 25 00:49:38 2007, pcoch wrote: > > To be totally honest I wish I knew. I'm just going through converting > the todo items in code into RT tickets and sometimes the todo comments > aren't necessarily all that clear as to what needs to be done. I'm > also (unfortunately) not familiar en

Re: Resumable exceptions

2008-08-21 Thread Stephen Weeks
Not long ago, Patrick R. Michaud proclaimed... > Here's a simple test for resumable exceptions that I'm trying > to get to work. I'm probably coding/understanding something wrong, > so any suggestions or pointers would be greatly appreciated. > > .sub main :

Re: Resumable exceptions

2008-08-20 Thread Allison Randal
Patrick R. Michaud wrote: What I'm trying to do is to test the ability to resume after exceptions thrown by C. The C sub above sets up a handler to catch exceptions, then calls C. The handler simply resumes any exception that is caught. The C sub prints 'ok 1', throws an ex

[perl #58176] [PATCH] dotnet exceptions

2008-08-20 Thread via RT
gcc --- Flags: category=languages severity=high ack=no --- make dotnet work with the new exceptions. I'm not sure how to return the jump_point correctly, but it looks fine. --- Summary of my parrot 0.7.0 (r0) configuration: configdate='Wed Aug 20 18:3

Resumable exceptions

2008-08-20 Thread Patrick R. Michaud
Here's a simple test for resumable exceptions that I'm trying to get to work. I'm probably coding/understanding something wrong, so any suggestions or pointers would be greatly appreciated. .sub main :main push_eh catcher 'foo'()

[perl #57978] Implement last/redo/next/continue control exceptions

2008-08-16 Thread [EMAIL PROTECTED] (via RT)
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #57978] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=57978 > - Needs last/redo/next/continue exceptions in PCT (PCT)

Re: Catching exceptions with the // operator

2008-08-08 Thread TSa
HaloO, Yaakov Belch wrote: I believe that ---from a usability point of view--- it's very important to: * classify exceptions by "severity" or other characteristics, * provide named adverbs/pragmas to modify default CATCH handlers, * make them configurable by "outer s

Re: Catching exceptions with the // operator

2008-08-08 Thread Yaakov Belch
Thank you very much! my $bill = try ack() orelse try thpp() orelse do ppt(); This certainly does what I asked for, and it's short enough (even if we need to add a few brackets). Yes, the basic problem with the proposal is that it catches all exceptions willy nill

Re: Catching exceptions with the // operator

2008-08-06 Thread John M. Dlugosz
ault_value; compute_statistics($data) // write_log_message("stats failed: $!"); With the proposed change, these ideoms work whether the functions throw exceptions or not. You can change the meaning of "fail" to throw exceptions or to return the unthrown object which is an interesting val

Re: Catching exceptions with the // operator

2008-08-06 Thread Larry Wall
On Wed, Aug 06, 2008 at 09:36:16AM -0700, jerry gay wrote: : i don't think this will work for perl 6. since perl 6 has resumeable : exceptions (like C), the meaning of the C operator could be : ambiguous. given the following statement, : : my $bill = ack() // thpp() // ppt(); : : with per

Re: Catching exceptions with the // operator

2008-08-06 Thread Paul Seamons
> in my mind, this strays too far from the meaning of C and adds > ambiguity that makes the operator unusable. perhaps there's room for > an operator that gives some sugar for > > my $bill = try { ack() CATCH { thpp() } }; > > but to me that code is concise enough that it doesn't warrant syntacti

Re: Catching exceptions with the // operator

2008-08-06 Thread jerry gay
On Wed, Aug 6, 2008 at 8:58 AM, Yaakov Belch <[EMAIL PROTECTED]> wrote: > In a little language that I wrote some time ago, I found it very useful to > let the // operator catch exceptions: > > f(x) // g(y) does: > * If f(x) returns a defined value, use this value. > * If f

Catching exceptions with the // operator

2008-08-06 Thread Yaakov Belch
In a little language that I wrote some time ago, I found it very useful to let the // operator catch exceptions: f(x) // g(y) does: * If f(x) returns a defined value, use this value. * If f(x) returns an undefined value, use the value of g(x) instead. * If f(x) throws an exception, catch and keep

[perl #57610] [PATCH] Resumable exceptions

2008-08-05 Thread via RT
1c4aa1f 100644 --- a/t/op/exceptions.t +++ b/t/op/exceptions.t @@ -6,7 +6,7 @@ use strict; use warnings; use lib qw( . lib ../lib ../../lib ); use Test::More; -use Parrot::Test tests => 29; +use Parrot::Test tests => 30; =head1 NAME @@ -608,6 +608,29 @@ Exception message: Class Foo already

[perl #56216] [PATCH] Handles parrot's exceptions in Str.substr.

2008-06-22 Thread via RT
# New Ticket Created by Vasily Chekalkin # Please include the string: [perl #56216] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=56216 > Hello. Attached patch handles parrot's exception on substr invocations and returns

Re: Exceptions and Concurrency Questions

2008-05-04 Thread Allison Randal
handler in its list? If so, how do we model this control flow? More on control flow tomorrow. I started to write this out, and then realized I already did in the Exceptions PDD. Allison

Re: Exceptions and Concurrency Questions

2008-05-01 Thread Allison Randal
tifies the scheduler that it has handled (or will handle) the exception by using the handled opcode. PDD 25 suggests that there are Task PMCs which represent or encapsulate these exceptions. Presumably the handled opcode will remove the exception Task from the scheduler and resume execut

Exceptions and Concurrency Questions

2008-04-30 Thread chromatic
hat it has handled (or will handle) the exception by using the handled opcode. PDD 25 suggests that there are Task PMCs which represent or encapsulate these exceptions. Presumably the handled opcode will remove the exception Task from the scheduler and resume execution at the appropriate point.

[perl #37287] [TODO] pdb - don't die on exceptions

2008-03-17 Thread Mark Glines via RT
ion. Instead, the exception crashes pdb. Fixing pdb to catch exceptions cleanly would make pdb significantly more useful as a debugger, I think. Mark

[perl #37287] [TODO] pdb - don't die on exceptions

2008-03-16 Thread James Keenan via RT
Friends, Doing cage cleaning today, I noticed that there has been no activity in this thread since last August. Are the issues that were under discussion still "live"? Should we still be considering the various patches? Update sought. Thank you very much. kid51

Re: [perl #46823] [TODO] [Pir] Rewrite ResizeablePMCArray tests properly when exceptions are implemented

2007-10-25 Thread Paul Cochrane
ally...). This issue is actually more > > general and *any* ResizeableArray needs the > > exceptions-related tests updated when we have exceptions implemented. > > Could you explain more fully what the problem is? Since we're currently > implementing the exceptions PDD, i

Re: [perl #46823] [TODO] [Pir] Rewrite ResizeablePMCArray tests properly when exceptions are implemented

2007-10-24 Thread Allison Randal
Paul Cochrane wrote: I updated the subject of this ticket to substitute PMC with * as this issue occurs more often than I first guessed (the problems one has when going through code serially...). This issue is actually more general and *any* ResizeableArray needs the exceptions-related tests

Re: [perl #46823] [TODO] [Pir] Rewrite ResizeablePMCArray tests properly when exceptions are implemented

2007-10-24 Thread Paul Cochrane
3 > > > > In t/pmc/resizeablepmcarray.t there is the todo item: > > # TODO: Rewrite these properly when we have exceptions > > Which is to say that the tests of various error conditions and their output > needs to be tested more thoroughly when exceptions are implemen

[perl #46823] [TODO] [Pir] Rewrite ResizeablePMCArray tests properly when exceptions are implemented

2007-10-24 Thread via RT
rly when we have exceptions Which is to say that the tests of various error conditions and their output needs to be tested more thoroughly when exceptions are implemented.

Re: [PATCH] Exceptions

2007-10-24 Thread Allison Randal
jerry gay wrote: i'd prefer 'count_eh', to match every other exception handler related op that has an '_eh' suffix. seems silly to have just one with a 'eh_' prefix. 'count_eh' isn't distinctive enough. Another possibility is not to provide an opcode for the number of exception handlers, sin

Re: [PATCH] Exceptions

2007-10-24 Thread jerry gay
On 10/24/07, Allison Randal <[EMAIL PROTECTED]> wrote: > Kevin Tew wrote: > > exceptions_ops.diff adds some simple ops needed for PDD compliance. > > exceptions.diff attempts to change all instances of clear_eh to pop_eh. > > Looks good. > > The exception handler stack introspection interface you a

Re: [PATCH] Exceptions

2007-10-24 Thread Allison Randal
Kevin Tew wrote: exceptions_ops.diff adds some simple ops needed for PDD compliance. exceptions.diff attempts to change all instances of clear_eh to pop_eh. Looks good. The exception handler stack introspection interface you added to the PDD is solid. The stack will be replaced by the concurr

[perl #46191] [TODO] Process exceptions properly in init_context()

2007-10-06 Thread via RT
nt = 0; /* TODO 1 - Exceptions !!! */ I think this means to handle exceptions wrt reference counts correctly, but I'm really not sure.

Re: [perl #37287] [TODO] pdb - don't die on exceptions

2007-08-03 Thread Mark Glines
> This patch makes parrot stop execution of the vm when running as a > debugger. > > This makes the pdb stop executing and shows the exception message > instead of silently exiting. Hi, pancake! I have tried to update your patch to svn r20469, see attached patch. Unfortunately, it doesn't work a

[perl #44139] opcodes, warnings, and exceptions

2007-07-24 Thread via RT
# New Ticket Created by Jerry Gay # Please include the string: [perl #44139] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=44139 > the api for opcodes needs review, especially with regard to the response to exceptional beh

Re: resumable exceptions and LEAVE/KEEP/UNDO blocks

2007-03-05 Thread Daniel Hulme
, > the stack is not unwound until some exception handler chooses to > unwind it by "handling" the exception in question. Yes, I did. I was grepping specifically for the bit on resumable exceptions and the quoted bit is 80 lines up so I missed it completely. Thanks for poin

Re: resumable exceptions and LEAVE/KEEP/UNDO blocks

2007-03-05 Thread Larry Wall
alls the LEAVE block to release the lock at some later : date, seems to be far from the best choice. Sure, we can warn : programmers to make their resumable-exception handlers short, or to only : throw non-resumable exceptions from blocks that are likely to be called : in such circumstances. I suppose that

resumable exceptions and LEAVE/KEEP/UNDO blocks

2007-03-05 Thread Daniel Hulme
we can warn programmers to make their resumable-exception handlers short, or to only throw non-resumable exceptions from blocks that are likely to be called in such circumstances. I suppose that would be an acceptable resolution, but it has an aura of non--re-entrant signal handlers about it, so it

Re: [perl #40824] loadlib opcode causes problems with exceptions

2006-11-11 Thread chromatic
bsequently. > >The fix was this patch . . . > >Looks good to me. I see chromatic has already committed this as > r15413. It just gets the test to pass; there are still outstanding questions with regard to exceptions and continuations and the C barrier. -- c

[perl #40824] loadlib opcode causes problems with exceptions

2006-11-11 Thread Bob Rogers
From: Matt Diephouse (via RT) <[EMAIL PROTECTED]> Date: Sat, 11 Nov 2006 16:46:20 -0800 If a loadlib fails, it doesn't throw a catchable exception. The t/ library/pg.t test was changed because it was failing on platforms where pg wasn't available. In particular, this assertion was g

[perl #40824] loadlib opcode causes problems with exceptions

2006-11-11 Thread via RT
# New Ticket Created by Matt Diephouse # Please include the string: [perl #40824] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=40824 > If a loadlib fails, it doesn't throw a catchable exception. The t/ library/pg.t test

  1   2   3   4   >