source: driver/error.ml @ 2826

Last change on this file since 2826 was 2826, checked in by sacerdot, 7 years ago

New error messages.

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