diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-10-01 13:13:10 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-10-01 13:13:10 -0700 |
commit | 4814bf94e75ffdcbd2a4093eb1ab67851980a37a (patch) | |
tree | 9fde405360c5499fa2ad4b25ca009ed3bcc1f57b /053continuation.cc | |
parent | 5fdd8e96adcf6f572888078caee62adbee1906a4 (diff) | |
download | mu-4814bf94e75ffdcbd2a4093eb1ab67851980a37a.tar.gz |
2226 - standardize warning format
Always show recipe name where error occurred. But don't show internal 'interactive' name for sandboxes, that's just confusing. What started out as warnings are now ossifying into errors that halt all execution. Is this how things went with C and Unix as well?
Diffstat (limited to '053continuation.cc')
-rw-r--r-- | 053continuation.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/053continuation.cc b/053continuation.cc index 769e09e8..42f32f6d 100644 --- a/053continuation.cc +++ b/053continuation.cc @@ -41,7 +41,7 @@ Recipe_ordinal["continue-from"] = CONTINUE_FROM; :(before "End Primitive Recipe Implementations") case CONTINUE_FROM: { if (!scalar(ingredients.at(0))) { - raise << current_recipe_name() << ": first ingredient of 'continue-from' should be a continuation id generated by 'current-continuation', but got " << current_instruction().ingredients.at(0).original_string << '\n' << end(); + raise << maybe(current_recipe_name()) << "first ingredient of 'continue-from' should be a continuation id generated by 'current-continuation', but got " << current_instruction().ingredients.at(0).original_string << '\n' << end(); break; } long long int c = ingredients.at(0).at(0); @@ -198,7 +198,7 @@ case REPLY_DELIMITED_CONTINUATION: { call_stack::iterator find_reset(call_stack& c); // manual prototype containing '::' call_stack::iterator reset = find_reset(Current_routine->calls); if (reset == Current_routine->calls.end()) { - raise << current_recipe_name() << ": couldn't find a 'reset' call to jump out to\n" << end(); + raise << maybe(current_recipe_name()) << "couldn't find a 'reset' call to jump out to\n" << end(); break; } Delimited_continuation[Next_delimited_continuation_id] = call_stack(Current_routine->calls.begin(), reset); @@ -228,7 +228,7 @@ call_stack::iterator find_reset(call_stack& c) { // copy multiple calls on to current call stack assert(scalar(ingredients.at(0))); if (Delimited_continuation.find(ingredients.at(0).at(0)) == Delimited_continuation.end()) { - raise << current_recipe_name() << ": no such delimited continuation " << current_instruction().ingredients.at(0).original_string << '\n' << end(); + raise << maybe(current_recipe_name()) << "no such delimited continuation " << current_instruction().ingredients.at(0).original_string << '\n' << end(); } const call_stack& new_calls = Delimited_continuation[ingredients.at(0).at(0)]; for (call_stack::const_reverse_iterator p = new_calls.rbegin(); p != new_calls.rend(); ++p) |