Worked on exception reporting.

This commit is contained in:
Brad Arant committed 2024-09-25 17:15:03 -07:00
1 parent 387203f4b3
commit e655173a8f
7 files changed
+86 -69

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
#include <iostream>
#include <sstream>
#include "File.h"
#include "Global.h"
#include "Exception.h"
#include "__jet.h"
int main(int argc, char **argv) {
coreutils::File script(argv[1]);
script.read();
coreutils::ZString data = script.asZString();
data.goeol();
try {
jet::Global global;
coreutils::MString out;
jet::__jet *jet = new jet::__jet(data, out, global);
delete jet;
std::cout << out;
}
catch(coreutils::Exception e) {
std::cout << "Error caught: " << e.text << std::endl;
}
}