Last change
on this file since 784 was
6,
checked in by cbipsl, 18 years ago
|
ajout rep ether
|
-
Property svn:executable set to
*
|
File size:
1.1 KB
|
Rev | Line | |
---|
[6] | 1 | /** |
---|
| 2 | * $Id: EtherException.java,v 1.1 2001/01/15 15:38:47 pn Exp $ |
---|
| 3 | * Exception à la base de toutes les exception applicatives. |
---|
| 4 | * |
---|
| 5 | */ |
---|
| 6 | package fr.alcatel.ether.app.exception; |
---|
| 7 | |
---|
| 8 | import fr.alcatel.ether.bean.ErrorBean; |
---|
| 9 | import fr.alcatel.ether.app.common.Config; |
---|
| 10 | |
---|
| 11 | public class EtherException extends Exception { |
---|
| 12 | |
---|
| 13 | /** Exception string - invalid service manager */ |
---|
| 14 | protected static final String E_INSUFFICIENT_RIGHTS = "User does not possess sufficient rights"; |
---|
| 15 | |
---|
| 16 | protected ErrorBean bean; |
---|
| 17 | |
---|
| 18 | /** |
---|
| 19 | * Basic constructor with no message. |
---|
| 20 | */ |
---|
| 21 | public EtherException( ) { |
---|
| 22 | super( ); |
---|
| 23 | } |
---|
| 24 | |
---|
| 25 | /** |
---|
| 26 | * Instantiate an EtherException with a message. |
---|
| 27 | */ |
---|
| 28 | public EtherException( String s ) { |
---|
| 29 | super( s ); |
---|
| 30 | bean = new ErrorBean(); |
---|
| 31 | // par défaut , titre d'une fenètre erreur système |
---|
| 32 | Config.getConfig(); |
---|
| 33 | bean.setTitle(""); |
---|
| 34 | bean.setMessage(s); |
---|
| 35 | } |
---|
| 36 | |
---|
| 37 | public EtherException( ErrorBean bean ) |
---|
| 38 | { |
---|
| 39 | super( (bean == null)?"<Unknown error message>":bean.getMessage() ); |
---|
| 40 | this.bean = bean; |
---|
| 41 | } |
---|
| 42 | |
---|
| 43 | public ErrorBean getBean(){ return this.bean; } |
---|
| 44 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.