Thread View: comp.lang.java.programmer
2 messages
2 total messages
Started by Juan Carlos
Mon, 19 Jan 1998 00:00
New Exception.
Author: Juan Carlos
Date: Mon, 19 Jan 1998 00:00
Date: Mon, 19 Jan 1998 00:00
43 lines
1964 bytes
1964 bytes
This is a multi-part message in MIME format.
--------------78CA19C843D6D528EDF29B15
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi !
Somebody knows how is it the best way to generate my own Exception?
Here, I think this idea. Is good?
---------------------------------------------------------------------
public class NotCanSendException extends Exception
{
public NotCanSendException(String notSend) throws Exception
{
throws new Exception(notSend);
}
}
--------------------------------------------------------------------
--------------78CA19C843D6D528EDF29B15
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Juan Carlos Bueno Villalba
Content-Disposition: attachment; filename="vcard.vcf"
begin: vcard
fn: Juan Carlos Bueno Villalba
n: Bueno Villalba;Juan Carlos
org: CTI
adr: C.T.I. - Universidad de C�rdoba - Campus de Rabanales - Carretera Madrid C�diz ;;;C�rdoba;C�rdoba;14071;Espa�a
email;internet: ct2buvij@uco.es
title: Analista Programador
tel;work: 957-211020
tel;fax: 957-211051
x-mozilla-cpt: ;0
x-mozilla-html: TRUE
version: 2.1
end: vcard
--------------78CA19C843D6D528EDF29B15--
Re: New Exception.
Author: Bill Wilkinson
Date: Mon, 19 Jan 1998 00:00
Date: Mon, 19 Jan 1998 00:00
29 lines
1314 bytes
1314 bytes
Juan Carlos wrote:
>
> Hi !
>
> Somebody knows how is it the best way to generate my own Exception?
>
> Here, I think this idea. Is good?
NO.
You should NOT create another exception from with
your exception's constructor.
Follow the lead of the other exception classes:
---------------------------------------------------------------------
public class NotCanSendException extends Exception
{
public NotCanSendException( )
{
super( ); // not really needed; won't hurt
}
public NotCanSendException( String notSend )
{
super( notSend ); // MUST have this
}
}
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads