Jasper icon indicating copy to clipboard operation
Jasper copied to clipboard

Integrate the logging code with `ErrorReport`

Open SebastianMestre opened this issue 4 years ago • 0 comments

It would be pretty cool to be able to write something like

ErrorReport err = match_identifiers(...);
if (!err.ok()) {
   Log::fatal() << err;
}

or like

auto err = make_located_error("undefined variable", location, ErrorLevel::Fatal);
err.print();

and have it print [ Fatal Error ] At xx:xx -- undefined variable, followed by termination of the program.

SebastianMestre avatar Apr 27 '21 21:04 SebastianMestre