source: josm/trunk/src/org/openstreetmap/josm/tools/UncheckedParseException.java@ 10621

Last change on this file since 10621 was 9385, checked in by simon04, 8 years ago

Refactoring: introduce UncheckedParseException

In addition, DateUtils#fromString does no longer return "now" when
date cannot be parsed, but throws an UncheckedParseException instead.

File size: 1.6 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.tools;
3
4/**
5 * Signals that an error has been reached unexpectedly while parsing.
6 *
7 * @see java.text.ParseException
8 * @since 9385
9 */
10public class UncheckedParseException extends RuntimeException {
11
12 /**
13 * Constructs a new {@code UncheckedParseException}.
14 */
15 public UncheckedParseException() {
16 }
17
18 /**
19 * Constructs a new {@code UncheckedParseException} with the specified detail message.
20 *
21 * @param message the detail message (which is saved for later retrieval by the {@link #getMessage()} method).
22 */
23 public UncheckedParseException(String message) {
24 super(message);
25 }
26
27 /**
28 * Constructs a new {@code UncheckedParseException} with the specified detail message and cause.
29 *
30 * @param message the detail message (which is saved for later retrieval by the {@link #getMessage()} method).
31 * @param cause the cause (which is saved for later retrieval by the {@link #getCause()} method).
32 * (A <tt>null</tt> value is permitted, and indicates that the cause is nonexistent or unknown.)
33 */
34 public UncheckedParseException(String message, Throwable cause) {
35 super(message, cause);
36 }
37
38 /**
39 * Constructs a new {@code UncheckedParseException} with the specified cause.
40 *
41 * @param cause the cause (which is saved for later retrieval by the {@link #getCause()} method).
42 * (A <tt>null</tt> value is permitted, and indicates that the cause is nonexistent or unknown.)
43 */
44 public UncheckedParseException(Throwable cause) {
45 super(cause);
46 }
47
48}
Note: See TracBrowser for help on using the repository browser.