/usr/share/axiom-20170501/src/algebra/OMERR.spad is in axiom-source 20170501-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | )abbrev domain OMERR OpenMathError
++ Author: Vilya Harvey
++ Description:
++ \spadtype{OpenMathError} is the domain of OpenMath errors.
OpenMathError() : SIG == CODE where
SIG ==> SetCategory with
errorKind : % -> OpenMathErrorKind
++ errorKind(u) returns the type of error which u represents.
errorInfo : % -> List Symbol
++ errorInfo(u) returns information about the error u.
omError : (OpenMathErrorKind, List Symbol) -> %
++ omError(k,l) creates an instance of OpenMathError.
CODE ==> add
Rep := Record(err:OpenMathErrorKind, info:List Symbol)
import List String
coerce(e:%):OutputForm ==
OMParseError? e.err => message "Error parsing OpenMath object"
infoSize := #(e.info)
OMUnknownCD? e.err =>
not (infoSize = 1) => error "Malformed info list in OMUnknownCD"
message concat("Cannot handle CD ",string first e.info)
OMUnknownSymbol? e.err =>
not 2=infoSize => error "Malformed info list in OMUnknownSymbol"
message concat ["Cannot handle Symbol ",
string e.info.2, " from CD ", string e.info.1]
OMReadError? e.err =>
message "OpenMath read error"
error "Malformed OpenMath Error"
omError(e:OpenMathErrorKind,i:List Symbol):% == [e,i]$Rep
errorKind(e:%):OpenMathErrorKind == e.err
errorInfo(e:%):List Symbol == e.info
|