[11374] | 1 | // License: GPL. For details, see LICENSE file.
|
---|
| 2 | package org.openstreetmap.josm.tools;
|
---|
| 3 |
|
---|
| 4 | /**
|
---|
| 5 | * JOSM runtime exception.
|
---|
| 6 | * @since 11374
|
---|
| 7 | */
|
---|
| 8 | public class JosmRuntimeException extends RuntimeException {
|
---|
| 9 |
|
---|
| 10 | /**
|
---|
| 11 | * Constructs a new {@code JosmRuntimeException} with the specified detail message.
|
---|
| 12 | * The cause is not initialized, and may subsequently be initialized by a call to {@link #initCause}.
|
---|
| 13 | *
|
---|
| 14 | * @param message the detail message. The detail message is saved for later retrieval by the {@link #getMessage()} method.
|
---|
| 15 | */
|
---|
| 16 | public JosmRuntimeException(String message) {
|
---|
| 17 | super(message);
|
---|
| 18 | }
|
---|
| 19 |
|
---|
| 20 | /**
|
---|
| 21 | * Constructs a new {@code JosmRuntimeException} with the specified cause and a detail message of
|
---|
| 22 | * <tt>(cause==null ? null : cause.toString())</tt> (which typically contains the class and detail message of <tt>cause</tt>).
|
---|
| 23 | * This constructor is useful for runtime exceptions that are little more than wrappers for other throwables.
|
---|
| 24 | *
|
---|
| 25 | * @param cause the cause (which is saved for later retrieval by the {@link #getCause()} method).
|
---|
| 26 | */
|
---|
| 27 | public JosmRuntimeException(Throwable cause) {
|
---|
| 28 | super(cause);
|
---|
| 29 | }
|
---|
| 30 |
|
---|
| 31 | /**
|
---|
| 32 | * Constructs a new {@code JosmRuntimeException} with the specified detail message and cause.<p>
|
---|
| 33 | * Note that the detail message associated with {@code cause} is <i>not</i> automatically incorporated in this exception's detail message.
|
---|
| 34 | *
|
---|
| 35 | * @param message the detail message (which is saved for later retrieval by the {@link #getMessage()} method).
|
---|
| 36 | * @param cause the cause (which is saved for later retrieval by the {@link #getCause()} method).
|
---|
| 37 | */
|
---|
| 38 | public JosmRuntimeException(String message, Throwable cause) {
|
---|
| 39 | super(message, cause);
|
---|
| 40 | }
|
---|
| 41 |
|
---|
| 42 | /**
|
---|
| 43 | * Constructs a new runtime exception with the specified detail message, cause,
|
---|
| 44 | * suppression enabled or disabled, and writable stack trace enabled or disabled.
|
---|
| 45 | *
|
---|
| 46 | * @param message the detail message
|
---|
| 47 | * @param cause the cause
|
---|
| 48 | * @param enableSuppression whether or not suppression is enabled or disabled
|
---|
| 49 | * @param writableStackTrace whether or not the stack trace should be writable
|
---|
| 50 | */
|
---|
| 51 | public JosmRuntimeException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
|
---|
| 52 | super(message, cause, enableSuppression, writableStackTrace);
|
---|
| 53 | }
|
---|
| 54 | }
|
---|