source: josm/trunk/src/org/openstreetmap/josm/gui/help/HelpContentReaderException.java@ 13493

Last change on this file since 13493 was 13493, checked in by Don-vip, 6 years ago

see #11924, see #15560, see #16048 - tt HTML tag is deprecated in HTML5: use code instead

  • Property svn:eol-style set to native
File size: 1.5 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.gui.help;
3
4/**
5 * Exception thrown when a problem occurs during help contents fetching.
6 * @since 2308
7 */
8public class HelpContentReaderException extends Exception {
9
10 private final int responseCode;
11
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.
15 * @param responseCode HTTP response code related to the wiki access exception (0 if not applicable)
16 */
17 public HelpContentReaderException(String message, int responseCode) {
18 super(message);
19 this.responseCode = responseCode;
20 }
21
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 <code>null</code> value is permitted, and indicates that the cause is nonexistent or unknown.)
26 * @param responseCode HTTP response code related to the wiki access exception (0 if not applicable)
27 */
28 public HelpContentReaderException(Throwable cause, int responseCode) {
29 super(cause);
30 this.responseCode = responseCode;
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 */
39 public final int getResponseCode() {
40 return responseCode;
41 }
42}
Note: See TracBrowser for help on using the repository browser.