| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
package org.locationtech.jts.geom; |
| 16 |
|
| 17 |
/** |
| 18 |
* Indicates an invalid or inconsistent topological situation encountered during processing |
| 19 |
* |
| 20 |
* @version 1.7 |
| 21 |
*/ |
| 22 |
public class TopologyException |
| 23 |
extends RuntimeException |
| 24 |
{ |
| 25 |
private static String msgWithCoord(String msg, Coordinate pt) |
| 26 |
{ |
| 27 |
if (pt != null) |
| 28 |
return msg + " [ " + pt + " ]"; |
| 29 |
return msg; |
| 30 |
} |
| 31 |
|
| 32 |
private Coordinate pt = null; |
| 33 |
|
| 34 |
public TopologyException(String msg) |
| 35 |
{ |
| 36 |
super(msg); |
| 37 |
} |
| 38 |
|
| 39 |
public TopologyException(String msg, Coordinate pt) |
| 40 |
{ |
| 41 |
super(msgWithCoord(msg, pt)); |
| 42 |
this.pt = new Coordinate(pt); |
| 43 |
} |
| 44 |
|
| 45 |
public Coordinate getCoordinate() { return pt; } |
| 46 |
|
| 47 |
} |
| 48 |
|