mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-18 07:15:19 +00:00
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.
30 lines
831 B
Java
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;
|
|
}
|
|
}
|
|
}
|