You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Alban Peignier <al...@free.fr> on 2004/02/14 23:40:55 UTC
[lang] [proposal] NotImplementedException with a Throwable cause
I used before a private NotYetImplementedException. I'm refactoring my
code to use the lang.NotImplementedException. One of my previous use
cases is no longer possible :
try {
...
} catch (... e) {
throw new NotImplentedException("... <case description> ...", e);
}
Does this usage seem useful for most of people ?
--
Alban Peignier - alban.peignier@free.fr
http://www.tryphon.org/~alban
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [lang] [proposal] NotImplementedException with a Throwable cause
Posted by Alban Peignier <al...@free.fr>.
Alban Peignier wrote:
> Stephen Colebourne wrote:
>
>> I have no problem with this, however the addition must be JDK1.2
>> compatable,
>> requiring a cause private variable and a getCause() method.
>
> I've just created a bug and provided a patch :
>
> http://issues.apache.org/bugzilla/show_bug.cgi?id=26954
My patch is so horrible ?? :o)
--
Alban Peignier - alban.peignier@free.fr
http://www.tryphon.org/~alban
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [lang] [proposal] NotImplementedException with a Throwable cause
Posted by Alban Peignier <al...@free.fr>.
Stephen Colebourne wrote:
>I have no problem with this, however the addition must be JDK1.2 compatable,
>requiring a cause private variable and a getCause() method.
>
>
I've just created a bug and provided a patch :
http://issues.apache.org/bugzilla/show_bug.cgi?id=26954
--
Alban Peignier - alban.peignier@free.fr
http://www.tryphon.org/~alban
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [lang] [proposal] NotImplementedException with a Throwable cause
Posted by Stephen Colebourne <sc...@btopenworld.com>.
I have no problem with this, however the addition must be JDK1.2 compatable,
requiring a cause private variable and a getCause() method.
Stephen
----- Original Message -----
From: "Alban Peignier" <al...@free.fr>
> Martin Cooper wrote:
>
> >Any reason you couldn't just use java.lang.UnsupportedOperationException?
It
> >extends RuntimeException, so you don't have to change the method
signature
> >when you do add the implementation.
> >
> >
> the *org.apache.commons.lang.NotImplementedException extends
> UnsupportedOperationException. No **change of the **method signature is
> needed.
>
> I propose to simply add a constructor to the NotImplementedException.*
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [lang] [proposal] NotImplementedException with a Throwable cause
Posted by Alban Peignier <al...@free.fr>.
Martin Cooper wrote:
>Any reason you couldn't just use java.lang.UnsupportedOperationException? It
>extends RuntimeException, so you don't have to change the method signature
>when you do add the implementation.
>
>
the *org.apache.commons.lang.NotImplementedException extends
UnsupportedOperationException. No **change of the **method signature is
needed.
I propose to simply add a constructor to the NotImplementedException.*
--
Alban Peignier - alban.peignier@free.fr
http://www.tryphon.org/~alban
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
RE: [lang] [proposal] NotImplementedException with a Throwable cause
Posted by Martin Cooper <ma...@apache.org>.
> -----Original Message-----
> From: matthew.hawthorne [mailto:matth@apache.org]
> Sent: Saturday, February 14, 2004 3:04 PM
> To: Jakarta Commons Developers List
> Subject: Re: [lang] [proposal] NotImplementedException with a Throwable
> cause
>
>
> Alban Peignier wrote:
> > I used before a private NotYetImplementedException. I'm refactoring my
> > code to use the lang.NotImplementedException. One of my previous use
> > cases is no longer possible :
> >
> > try {
> > ...
> > } catch (... e) {
> > throw new NotImplentedException("... <case description> ...", e);
> > }
> >
> > Does this usage seem useful for most of people ?
>
>
> While I can't say that I would use it in the same way, I can see your
> point here -- the
> exception is thrown to indicate a portion of code that hasn't been
> written yet. I find myself
> stubbing things out in a similar way very frequently.
>
> Any [lang] folks have a problem with this being added?
Any reason you couldn't just use java.lang.UnsupportedOperationException? It
extends RuntimeException, so you don't have to change the method signature
when you do add the implementation.
--
Martin Cooper
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [lang] [proposal] NotImplementedException with a Throwable cause
Posted by "matthew.hawthorne" <ma...@apache.org>.
Alban Peignier wrote:
> I used before a private NotYetImplementedException. I'm refactoring my
> code to use the lang.NotImplementedException. One of my previous use
> cases is no longer possible :
>
> try {
> ...
> } catch (... e) {
> throw new NotImplentedException("... <case description> ...", e);
> }
>
> Does this usage seem useful for most of people ?
While I can't say that I would use it in the same way, I can see your
point here -- the
exception is thrown to indicate a portion of code that hasn't been
written yet. I find myself
stubbing things out in a similar way very frequently.
Any [lang] folks have a problem with this being added?
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org