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

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

[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.

[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

[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++

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

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

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

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: Exceptions on hypers

2006-10-04 Thread Larry Wall
On Wed, Oct 04, 2006 at 10:35:05AM -0400, Aaron Sherman wrote: : Damian Conway wrote: : : > @bar».foo if $baz; : : That brought to mind the question that I've had for some time: how are : exceptions going to work on hyper-operators? : : Will they kill the hyperoperation in-progr

Re: Exceptions on hypers

2006-10-04 Thread Aaron Sherman
Aaron Sherman wrote: Damian Conway wrote: @bar».foo if $baz; That brought to mind the question that I've had for some time: how are exceptions going to work on hyper-operators? Will they kill the hyperoperation in-progress? e.g. what will $i be: Corrected example follows (there

Exceptions on hypers

2006-10-04 Thread Aaron Sherman
Damian Conway wrote: @bar».foo if $baz; That brought to mind the question that I've had for some time: how are exceptions going to work on hyper-operators? Will they kill the hyperoperation in-progress? e.g. what will $i be: my $i = 0; class A { method inci() { d

Uncaught exceptions

2006-09-01 Thread Andrew Suffield
What is the behaviour of an *uncaught* exception, particularly with respect to CHECK/END/LEAVE/LAST blocks, destructors, overloading of the stringify operator on exception objects, the order in which these things are executed, and the exit code of the process? (And anything else that I haven't thou

Continuing in the face of exceptions, and what's the negation of // ?

2005-10-13 Thread Austin Hastings
hat we are going to throw exceptions, there needs to be a quick way of huffmanizing the scaffolding. IIRC, "use fatal" decides between an exception being thrown and an "undef but ..." value being returned. IMO, it's important to coerce code into the same behavior: If

Re: Of fail, exceptions and catching

2005-05-11 Thread Aaron Sherman
On Wed, 2005-05-11 at 09:50, Luke Palmer wrote: > Oh, just to avoid further confusion: In the baz() called under fatal, > it will only turn undefs that were generated by "fail" calls into > exceptions. Other sorts of undefs will be returned as ordinary > undefs. Ok, so let

Re: Of fail, exceptions and catching

2005-05-11 Thread Luke Palmer
ns the undef that it got from foo() Oh, just to avoid further confusion: In the baz() called under fatal, it will only turn undefs that were generated by "fail" calls into exceptions. Other sorts of undefs will be returned as ordinary undefs. Likewise, in the bar() called under no fatal,

Re: Of fail, exceptions and catching

2005-05-11 Thread Luke Palmer
an undef with some helpful diagnostic information (an "unthrown exception" as Larry has been calling it). > "use fatal" to make "fail" throw exceptions > > A question came up on #perl6 for the following code: > > no fatal; >

Re: Of fail, exceptions and catching

2005-05-11 Thread Juerd
Aaron Sherman skribis 2005-05-11 7:44 (-0400): > "no fatal" to make "fail" just warn I thought it wouldn't warn, but instead silently return undef (an unthrown exception). Juerd -- http://convolution.nl/maak_juerd_blij.html http://convolution.nl/make_juerd_happy.html http://convolution.

Of fail, exceptions and catching

2005-05-11 Thread Aaron Sherman
Given: "fail" with configurable behavior "no fatal" to make "fail" just warn "use fatal" to make "fail" throw exceptions A question came up on #perl6 for the following code: no fatal; class Foo {

Re: Exceptions

2003-06-27 Thread Dave Whipp
;d try and see how this would work. A toy example: implementing saturated arithetic uses exceptions: sub incr ( int $a is rw is checked ) { $a++; CATCH { when IntegerOverflow { $a = int.max }; default { throw } } } This would work for a single variable, but no extend it to do a few mor

Re: Exceptions

2003-06-27 Thread Piers Cawley
st first programming. You just write your test and start the test suite running, when this throws an 'unknown method exception' or whatever, you use the debugger to implement/stub out the method in question, retry, and repeat until the test stops throwing exceptions. > So, maybe what

Re: Exceptions

2003-06-27 Thread Luke Palmer
This is more of a language thang, so I've redirected your message there [here]. > The most fundamental feature throwing an exception is that it transfers > program execution from the call site. Allowing the caller to resume > execution at that site is a very dangerous form of action at a distance.

Re: A concept for Exceptions

2002-10-22 Thread Piers Cawley
idea is golden. > >> To change how certain exceptions behave, a block simply changes the methods >> of the existing ExceptionCreator to point to other subroutines. This >> approach allows for an ala carte style of exception configuration. Blocks >> can (through a mod

Re: A concept for Exceptions

2002-10-15 Thread Dan Sugalski
lse. While a nifty idea, this is not going to happen, at least not in the general case. Restartable exceptions are very, very difficult to do. (And parrot, alas, isn't going to be able to do them) You still need to establish an exception handler at the spot you want to restart at (which isn&

Re: A concept for Exceptions

2002-10-15 Thread [EMAIL PROTECTED]
esting is that certain common types of exceptions could be handled in-place, instead of having to write exception handlers. Perl5 already does some things like this, e.g. undefs become empty strings and zeros when needed. I'm just suggesting formalizing the process more so that custom

Re: A concept for Exceptions

2002-10-15 Thread Luke Palmer
> From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > Date: Tue, 15 Oct 2002 14:33:28 -0400 I like the idea of this. The finer details, like returning what to do, could be more elegant. But the extensibility idea is golden. > To change how certain exceptions behave, a

A concept for Exceptions

2002-10-15 Thread [EMAIL PROTECTED]
A brainstorm for your enjoyment, perusal, and general discussion... SUMMARY A proposal for an extension to the usual exception handling concept. The concept detailed here provides a mechanism for handling exceptions in one of three ways: changing the values being evaluated, setting the result

Re: "Non-yet-thrown exceptions must be a useful concept."

2002-01-26 Thread Larry Wall
Me writes: : "Non-yet-thrown exceptions must be a useful concept." : : This is a bullet point from a list in Apo4 introducing : coverage of exception handling. Was Larry talking : about an exception object that hasn't yet been thrown? : Did he refer to this issue again anywhere

"Non-yet-thrown exceptions must be a useful concept."

2002-01-26 Thread Me
"Non-yet-thrown exceptions must be a useful concept." This is a bullet point from a list in Apo4 introducing coverage of exception handling. Was Larry talking about an exception object that hasn't yet been thrown? Did he refer to this issue again anywhere else in the Apo? --me

End-of-scope actions: Core exceptions.

2001-02-14 Thread Tony Olekshy
Nicholas Clark wrote: > > my $f = open $file or die "can't open $file"; > > is troublesome. It doesn't report *why* the file can't be opened. > > [...] *flexible* exceptions are needed The first version of RFC 88 didn't care what exception obj

[]->isa('Foo') to not throw exceptions

2001-01-04 Thread Piers Cawley
Did we do this one already? I have an embarrassingly large amount of code that has to do Cisa('Foo') }>, or Ccan('Bar') }> because there is a chance that C<$foo> is an unblessed reference. I would use UNIVERSAL::can directly, but I have some code (a container/decorator class) that messes with is