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
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23 package jdk.vm.ci.common;
24
25 import java.util.*;
26
27 /**
28 * Indicates a condition in JVMCI related code that should never occur during normal operation.
29 */
30 public class JVMCIError extends Error {
31
32 private static final long serialVersionUID = 531632331813456233L;
33 private final ArrayList<String> context = new ArrayList<>();
34
35 public static RuntimeException unimplemented() {
36 throw new JVMCIError("unimplemented");
37 }
38
39 public static RuntimeException unimplemented(String msg) {
40 throw new JVMCIError("unimplemented: %s", msg);
41 }
42
43 public static RuntimeException shouldNotReachHere() {
44 throw new JVMCIError("should not reach here");
45 }
|
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
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23 package jdk.vm.ci.common;
24
25 import java.util.ArrayList;
26 import java.util.Locale;
27
28 /**
29 * Indicates a condition in JVMCI related code that should never occur during normal operation.
30 */
31 public class JVMCIError extends Error {
32
33 private static final long serialVersionUID = 531632331813456233L;
34 private final ArrayList<String> context = new ArrayList<>();
35
36 public static RuntimeException unimplemented() {
37 throw new JVMCIError("unimplemented");
38 }
39
40 public static RuntimeException unimplemented(String msg) {
41 throw new JVMCIError("unimplemented: %s", msg);
42 }
43
44 public static RuntimeException shouldNotReachHere() {
45 throw new JVMCIError("should not reach here");
46 }
|