@@ -95,7 +95,8 @@ void lazy_goto_modelt::initialize(const cmdlinet &cmdline)
95
95
const std::vector<std::string> &files=cmdline.args ;
96
96
if (files.empty ())
97
97
{
98
- throw invalid_user_input_exceptiont (" No program provided" , " " , " " );
98
+ throw invalid_user_input_exceptiont (
99
+ " no program provided" , " cbmc file.c ..." );
99
100
}
100
101
101
102
std::vector<std::string> binaries, sources;
@@ -134,10 +135,8 @@ void lazy_goto_modelt::initialize(const cmdlinet &cmdline)
134
135
source_locationt location;
135
136
location.set_file (filename);
136
137
msg.error ().source_location =location;
137
- throw deserialization_exceptiont (
138
- " failed to figure out type of file"
139
- " \n source location: " +
140
- location.as_string ());
138
+ throw incorrect_goto_program_exceptiont (
139
+ " failed to figure out type of file" , location);
141
140
}
142
141
143
142
languaget &language=*lf.language ;
@@ -148,8 +147,7 @@ void lazy_goto_modelt::initialize(const cmdlinet &cmdline)
148
147
149
148
if (language.parse (infile, filename))
150
149
{
151
- // TODO more helpful error message
152
- throw deserialization_exceptiont (" PARSING ERROR" );
150
+ throw deserialization_exceptiont (" language parsing failed" );
153
151
}
154
152
155
153
lf.get_modules ();
@@ -159,8 +157,8 @@ void lazy_goto_modelt::initialize(const cmdlinet &cmdline)
159
157
160
158
if (language_files.typecheck (symbol_table))
161
159
{
162
- // TODO more helpful error message
163
- throw deserialization_exceptiont ( " CONVERSION ERROR " );
160
+ throw deserialization_exceptiont (
161
+ " type-checking of interface/files/modules failed " );
164
162
}
165
163
}
166
164
@@ -170,8 +168,8 @@ void lazy_goto_modelt::initialize(const cmdlinet &cmdline)
170
168
171
169
if (read_object_and_link (file, *goto_model, message_handler))
172
170
{
173
- // TODO more helpful error message
174
- throw deserialization_exceptiont ( " Failed to read/ link goto model " );
171
+ throw deserialization_exceptiont (
172
+ " failed to read object or link in file ` " + file + ' \' ' );
175
173
}
176
174
}
177
175
@@ -207,8 +205,7 @@ void lazy_goto_modelt::initialize(const cmdlinet &cmdline)
207
205
208
206
if (entry_point_generation_failed)
209
207
{
210
- // TODO more helpful error message
211
- throw deserialization_exceptiont (" SUPPORT FUNCTION GENERATION ERROR" );
208
+ throw deserialization_exceptiont (" failed to generate entry point" );
212
209
}
213
210
214
211
// stupid hack
0 commit comments