equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
36 public class HeadlessException extends UnsupportedOperationException { |
36 public class HeadlessException extends UnsupportedOperationException { |
37 /* |
37 /* |
38 * JDK 1.4 serialVersionUID |
38 * JDK 1.4 serialVersionUID |
39 */ |
39 */ |
40 private static final long serialVersionUID = 167183644944358563L; |
40 private static final long serialVersionUID = 167183644944358563L; |
|
41 |
|
42 /** |
|
43 * Constructs new {@code HeadlessException} |
|
44 */ |
41 public HeadlessException() {} |
45 public HeadlessException() {} |
|
46 |
|
47 /** |
|
48 * Create a new instance with the specified detailed error message. |
|
49 * |
|
50 * @param msg the error message |
|
51 */ |
42 public HeadlessException(String msg) { |
52 public HeadlessException(String msg) { |
43 super(msg); |
53 super(msg); |
44 } |
54 } |
|
55 |
|
56 /** |
|
57 * {@inheritDoc} |
|
58 */ |
45 public String getMessage() { |
59 public String getMessage() { |
46 String superMessage = super.getMessage(); |
60 String superMessage = super.getMessage(); |
47 String headlessMessage = GraphicsEnvironment.getHeadlessMessage(); |
61 String headlessMessage = GraphicsEnvironment.getHeadlessMessage(); |
48 |
62 |
49 if (superMessage == null) { |
63 if (superMessage == null) { |