Skip to content

Commit 0ca3ece

Browse files
author
martin
committed
Improve error reporting for unsupported combinations of task / interpreter / domain.
1 parent 5ff9c51 commit 0ca3ece

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

src/goto-analyzer/static_analyzer.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ bool static_analyzer(
267267
// (goto_model, options, message_handler, out)();
268268

269269
else
270-
return true;
270+
goto fail;
271271
}
272272
else if (options.get_bool_option("concurrent"))
273273
{
@@ -287,8 +287,14 @@ bool static_analyzer(
287287

288288
else
289289
#endif
290-
return true;
290+
goto fail;
291291
}
292292
else
293-
return true;
293+
goto fail;
294+
295+
296+
fail :
297+
messaget m(message_handler);
298+
m.status() << "Task / Interpreter / Domain combination not supported" << messaget::eom;
299+
return true;
294300
}

src/goto-analyzer/static_show_domain.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ bool static_show_domain(
6666
}
6767

6868
if (domain == NULL)
69+
{
70+
messaget m(message_handler);
71+
m.status() << "Task / Interpreter / Domain combination not supported" << messaget::eom;
6972
return true;
73+
}
7074

7175
//status() << "performing analysis" << eom;
7276
(*domain)(goto_model);

src/goto-analyzer/static_simplifier.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ bool static_simplifier(
257257
// (goto_model, options, message_handler, out)();
258258

259259
else
260-
return true;
260+
goto fail;
261261
}
262262
else if (options.get_bool_option("concurrent"))
263263
{
@@ -277,8 +277,13 @@ bool static_simplifier(
277277

278278
else
279279
#endif
280-
return true;
280+
goto fail;
281281
}
282282
else
283-
return true;
283+
goto fail;
284+
285+
fail :
286+
messaget m(message_handler);
287+
m.status() << "Task / Interpreter / Domain combination not supported" << messaget::eom;
288+
return true;
284289
}

0 commit comments

Comments
 (0)