1 | package dmg.cells.nucleus ; |
2 | |
3 | /** |
4 | * |
5 | * |
6 | * @author Patrick Fuhrmann |
7 | * @version 0.1, 15 Feb 1998 |
8 | */ |
9 | public class NoRouteToCellException extends Exception { |
10 | private static final long serialVersionUID = -7538969590898439933L; |
11 | private UOID _uoid = null ; |
12 | private CellPath _path = null ; |
13 | public NoRouteToCellException( String str ){ |
14 | super( str ) ; |
15 | } |
16 | public NoRouteToCellException( UOID uoid , String str ){ |
17 | super( str ) ; |
18 | _uoid = uoid ; |
19 | } |
20 | public NoRouteToCellException( UOID uoid , CellPath path , String str ){ |
21 | this( uoid, str ) ; |
22 | _path = path ; |
23 | } |
24 | public String toString(){ |
25 | return "No Route to cell for packet "+getMessage() ; |
26 | } |
27 | public String getMessage(){ |
28 | String msg = super.getMessage() ; |
29 | return "{uoid="+(_uoid==null?"0-0":_uoid.toString())+";path="+ |
30 | (_path==null?"?":_path.toString())+ |
31 | (msg==null?"":(";msg="+msg))+"}"; |
32 | } |
33 | public UOID getUOID(){ return _uoid ; } |
34 | public CellPath getDestinationPath(){ return _path ; } |
35 | } |