Files
mercury/java/runtime/Exception.java
Mark Brown d465fa53cb Update the COPYING.LIB file and references to it.
Discussion of these changes can be found on the Mercury developers
mailing list archives from June 2018.

COPYING.LIB:
    Add a special linking exception to the LGPL.

*:
    Update references to COPYING.LIB.

    Clean up some minor errors that have accumulated in copyright
    messages.
2018-06-09 17:43:12 +10:00

30 lines
831 B
Java

//
// Copyright (C) 2009 The University of Melbourne.
// Copyright (C) 2018 The Mercury team.
// This file is distributed under the terms specified in COPYING.LIB.
//
package jmercury.runtime;
public class Exception extends java.lang.Error {
// This is to be set when the exception module is initialised, to avoid
// having the runtime depend on the standard library.
public static MethodPtr1 getMessageHook = null;
// Should be univ.Univ_0 but we don't want to depend on the standard
// library.
public Object exception;
public Exception(Object exception) {
this.exception = exception;
}
public String getMessage() {
if (getMessageHook != null) {
return (String) getMessageHook.call___0_0(exception);
} else {
return null;
}
}
}