error reporting now reports accurately to the line.
This commit is contained in:
1 parent
79d68d6c34
commit
e3d788bc92
6 files changed
+23
-8
No files matched your search
+8
-1
@@ -16,16 +16,23 @@ int main(int argc, char **argv, char **envp) {
|
||||
|
||||
try {
|
||||
coreutils::MString out;
|
||||
data.reset();
|
||||
global.errorCursor = data.getCursor();
|
||||
jet::__jet *jet = new jet::__jet(data, out, global, NULL);
|
||||
delete jet;
|
||||
global.outputHeaders();
|
||||
std::cout << out;
|
||||
}
|
||||
catch(coreutils::Exception e) {
|
||||
data.setCursor(global.errorCursor);
|
||||
data.moveBackToLineStart();
|
||||
std::cout << "-----------------------------" << std::endl;
|
||||
std::cout << "Error in jet script '" << argv[1] << "' at line " << data.getLineNumberAtCursor() << std::endl;
|
||||
std::cout << "Error text: " << e.text << std::endl;
|
||||
std::cout << "-----------------------------" << std::endl;
|
||||
std::cout << data.parsed() << std::endl;
|
||||
std::cout << "******** Error caught: " << e.text << std::endl;
|
||||
std::cout << data.unparsed() << std::endl;
|
||||
std::cout << "Error caught: " << e.text << std::endl;
|
||||
global.dump();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user