Ghidra Decompiler Analysis Engine
error.hh
Go to the documentation of this file.
1 /* ###
2  * IP: GHIDRA
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
20 
21 #ifndef __CPUI_ERROR__
22 #define __CPUI_ERROR__
23 
24 #include "types.h"
25 #include <sstream>
26 #include <fstream>
27 #include <iomanip>
28 #include <map>
29 #include <set>
30 #include <list>
31 #include <vector>
32 #include <algorithm>
33 #include <cstring>
34 #include <cctype>
35 
36 using namespace std;
37 
44 struct LowlevelError {
45  string explain;
46  LowlevelError(const string &s) { explain = s; }
48 };
49 
55 struct RecovError : public LowlevelError {
57  RecovError(const string &s) : LowlevelError(s) {}
58 };
59 
65 struct ParseError : public LowlevelError { // Parsing error
67  ParseError(const string &s) : LowlevelError(s) {}
68 };
69 
70 #endif
LowlevelError
The lowest level error generated by the decompiler.
Definition: error.hh:44
ParseError::ParseError
ParseError(const string &s)
Initialize the error with an explanatory string.
Definition: error.hh:67
ParseError
An error generated while parsing a command or language.
Definition: error.hh:65
LowlevelError::explain
string explain
Definition: error.hh:45
RecovError::RecovError
RecovError(const string &s)
Initialize the error with an explanatory string.
Definition: error.hh:57
RecovError
A generic recoverable error.
Definition: error.hh:55