source: driver/error.ml @ 2721

Last change on this file since 2721 was 2721, checked in by campbell, 8 years ago

Give the real error in the driver.

File size: 2.6 KB
Line 
1open Extracted.Errors
2open Extracted.ErrorMessages
3
4let error_to_string = function
5| MISSING -> "MISSING"
6| EXTERNAL -> "EXTERNAL"
7| Jump_expansion_failed
8| ValueIsNotABoolean -> "ValueIsNotABoolean"
9| BadCast -> "BadCast"
10| BadlyTypedTerm -> "BadlyTypedTerm"
11| UnknownIdentifier -> "UnknownIdentifier"
12| BadLvalueTerm -> "BadLvalueTerm"
13| FailedLoad -> "FailedLoad"
14| FailedOp -> "FailedOp"
15| WrongNumberOfParameters -> "WrongNumberOfParameters"
16| FailedStore -> "FailedStore"
17| NonsenseState -> "NonsenseState"
18| ReturnMismatch -> "ReturnMismatch"
19| UnknownLabel -> "UnknownLabel"
20| BadFunctionValue -> "BadFunctionValue"
21| MainMissing -> "MainMissing"
22| UnknownField -> "UnknownField"
23| UndeclaredIdentifier -> "UndeclaredIdentifier"
24| BadlyTypedAccess -> "BadlyTypedAccess"
25| BadLvalue -> "BadLvalue"
26| MissingField -> "MissingField"
27| FIXME -> "FIXME"
28| MissingLabel -> "MissingLabel"
29| ParamGlobalMixup -> "ParamGlobalMixup"
30| DuplicateLabel -> "DuplicateLabel"
31| TypeMismatch -> "TypeMismatch"
32| UnknownLocal -> "UnknownLocal"
33| FailedConstant -> "FailedConstant"
34| BadState -> "BadState"
35| StoppedMidIO -> "StoppedMidIO"
36| UnsupportedOp -> "UnsupportedOp"
37| CorruptedPointer -> "CorruptedPointer"
38| NotATwoBytesPointer -> "NotATwoBytesPointer"
39| ValueNotABoolean -> "ValueNotABoolean"
40| NotAnInt32Val
41| WrongLength -> "WrongLength"
42| InitDataStoreFailed -> "InitDataStoreFailed"
43| DuplicateVariable -> "DuplicateVariable"
44| MissingId -> "MissingId"
45| IllTypedEvent -> "IllTypedEvent"
46| InternalStackFull -> "InternalStackFull"
47| InternalStackEmpty -> "InternalStackEmpty"
48| BadProgramCounter -> "BadProgramCounter"
49| ProgramCounterOutOfCode -> "ProgramCounterOutOfCode"
50| PointNotFound -> "PointNotFound"
51| LabelNotFound -> "LabelNotFound"
52| MissingSymbol -> "MissingSymbol"
53| BadFunction -> "BadFunction"
54| SuccessorNotProvided -> "SuccessorNotProvided"
55| BadPointer -> "BadPointer"
56| NoSuccessor -> "NoSuccessor"
57| MissingStackSize -> "MissingStackSize"
58| ExternalMain -> "ExternalMain"
59| BadRegister -> "BadRegister"
60| BadMain -> "BadMain"
61| MissingRegister -> "MissingRegister"
62| MissingStatement -> "MissingStatement"
63| BadJumpTable -> "BadJumpTable"
64| BadJumpValue -> "BadJumpValue"
65| FinalState -> "FinalState"
66| EmptyStack -> "EmptyStack"
67| OutOfBounds -> "OutOfBounds"
68| UnexpectedIO -> "UnexpectedIO"
69| TerminatedEarly -> "TerminatedEarly"
70
71let rec conv_list l =
72(match l with
73| Extracted.List.Nil -> [ ]
74| Extracted.List.Cons (h, t) -> h::conv_list t)
75
76let errormsg m =
77  String.concat " "
78    (conv_list
79      (Extracted.List.map
80        (function Extracted.Errors.MSG e -> error_to_string e | _ -> "")
81       m))
Note: See TracBrowser for help on using the repository browser.