Last change
on this file since 12395 was 10137, checked in by Don-vip, 8 years ago |
sonar, javadoc
|
-
Property svn:eol-style
set to
native
|
File size:
1.5 KB
|
Rev | Line | |
---|
[2512] | 1 | // License: GPL. For details, see LICENSE file.
|
---|
| 2 | package org.openstreetmap.josm.gui.help;
|
---|
| 3 |
|
---|
[10137] | 4 | /**
|
---|
| 5 | * Exception thrown when a problem occurs during help contents fetching.
|
---|
| 6 | * @since 2308
|
---|
| 7 | */
|
---|
[2512] | 8 | public class HelpContentReaderException extends Exception {
|
---|
| 9 |
|
---|
[10137] | 10 | private final int responseCode;
|
---|
| 11 |
|
---|
[10103] | 12 | /**
|
---|
| 13 | * Constructs a new {@code HelpContentReaderException}.
|
---|
| 14 | * @param message the detail message. The detail message is saved for later retrieval by the {@link #getMessage()} method.
|
---|
[10137] | 15 | * @param responseCode HTTP response code related to the wiki access exception (0 if not applicable)
|
---|
[10103] | 16 | */
|
---|
[10137] | 17 | public HelpContentReaderException(String message, int responseCode) {
|
---|
[2512] | 18 | super(message);
|
---|
[10137] | 19 | this.responseCode = responseCode;
|
---|
[2512] | 20 | }
|
---|
| 21 |
|
---|
[10103] | 22 | /**
|
---|
| 23 | * Constructs a new {@code HelpContentReaderException}.
|
---|
| 24 | * @param cause the cause (which is saved for later retrieval by the {@link #getCause()} method).
|
---|
| 25 | * (A <tt>null</tt> value is permitted, and indicates that the cause is nonexistent or unknown.)
|
---|
[10137] | 26 | * @param responseCode HTTP response code related to the wiki access exception (0 if not applicable)
|
---|
[10103] | 27 | */
|
---|
[10137] | 28 | public HelpContentReaderException(Throwable cause, int responseCode) {
|
---|
[2512] | 29 | super(cause);
|
---|
[10137] | 30 | this.responseCode = responseCode;
|
---|
[2512] | 31 | }
|
---|
| 32 |
|
---|
| 33 | /**
|
---|
| 34 | * Replies the HTTP response code related to the wiki access exception.
|
---|
| 35 | * If no HTTP response code is available, 0 is replied.
|
---|
| 36 | *
|
---|
| 37 | * @return the http response code
|
---|
| 38 | */
|
---|
[10137] | 39 | public final int getResponseCode() {
|
---|
[2512] | 40 | return responseCode;
|
---|
| 41 | }
|
---|
| 42 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.