Bug #1421
SEGV: error("")
Description
The error
function does not like having an empty string as argument: throws a fatal exception!
Reported vocally by Julian Danner.
History
#1 Updated by John Abbott about 4 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 10
Not pretty!!
>>> error(""); CoCoAInterpreter: LineProviders.H:200: CoCoA::LexerNS::BaseException::BaseException(const string&): Assertion `reason.length()>0' failed. Process cocoa5 aborted (core dumped)
Looks like a failed assertion...
#2 Updated by John Abbott about 4 years ago
explicit BaseException::BaseException(const std::string &reason) : reason(reason) { assert(reason.length()>0); }
Mmmm :-/
#3 Updated by John Abbott about 4 years ago
- % Done changed from 10 to 50
While it is hard to imagine how an empty error description could be useful, it is surely wrong that CoCoA-5 crashes.
So I plan to allow an empty description (and perhaps I'll replace it by a short message saying no description was given).
First impl compiles, but CoCoA-5 continues to behave as before... there is something wrong in the compilation mechanism!
#4 Updated by John Abbott about 4 years ago
- Status changed from In Progress to Feedback
- Assignee set to John Abbott
- % Done changed from 50 to 90
- Estimated time set to 0.99 h
Not sure what the compilation problem in comment 3 was; it seems that starting CoCoA-5 from inside emacs, might sometimes start the old version(???)
Anyway, it now works as expected. An empty string is actually replaced by >>>> no description given <<<<
#5 Updated by John Abbott about 4 years ago
- Status changed from Feedback to Closed
- % Done changed from 90 to 100