Skip to content

Commit

Permalink
main: fix not printing some errors
Browse files Browse the repository at this point in the history
Pretty much revert 4a07597 it needs a
rethink.

Fixes: #405
  • Loading branch information
saghul committed Sep 29, 2023
1 parent 5ec31d8 commit 90b2061
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 27 deletions.
46 changes: 22 additions & 24 deletions src/bundles/c/core/run-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

#include <inttypes.h>

const uint32_t tjs__run_main_size = 20737;
const uint32_t tjs__run_main_size = 20726;

const uint8_t tjs__run_main[20737] = {
const uint8_t tjs__run_main[20726] = {
0x02, 0xc5, 0x03, 0x16, 0x72, 0x75, 0x6e, 0x2d,
0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x6a, 0x73, 0x16,
0x74, 0x6a, 0x73, 0x3a, 0x67, 0x65, 0x74, 0x6f,
Expand Down Expand Up @@ -2572,31 +2572,29 @@ const uint8_t tjs__run_main[20737] = {
0x00, 0x42, 0x3c, 0x01, 0x00, 0x00, 0xb6, 0x24,
0x01, 0x00, 0x29, 0xbc, 0x03, 0x2f, 0x00, 0x0e,
0x02, 0x06, 0x01, 0x00, 0x00, 0x01, 0x00, 0x04,
0x02, 0x00, 0x4b, 0x01, 0xb8, 0x08, 0x03, 0x00,
0x02, 0x00, 0x40, 0x01, 0xb8, 0x08, 0x03, 0x00,
0x03, 0xe8, 0x03, 0x0d, 0x00, 0xca, 0x03, 0x06,
0x09, 0x6c, 0x18, 0x00, 0x00, 0x00, 0xdd, 0x41,
0x37, 0x01, 0x00, 0x00, 0x42, 0x9f, 0x02, 0x00,
0x00, 0x65, 0x01, 0x00, 0x24, 0x01, 0x00, 0x0e,
0x0e, 0x29, 0xc9, 0x6c, 0x2f, 0x00, 0x00, 0x00,
0xc5, 0x38, 0xcb, 0x00, 0x00, 0x00, 0xa7, 0x11,
0xea, 0x10, 0x0e, 0x38, 0x32, 0x01, 0x00, 0x00,
0x42, 0xbc, 0x01, 0x00, 0x00, 0xc5, 0x24, 0x01,
0x00, 0x0e, 0x38, 0xfb, 0x00, 0x00, 0x00, 0x42,
0x3c, 0x01, 0x00, 0x00, 0xb6, 0x24, 0x01, 0x00,
0x0e, 0x0e, 0x29, 0x2f, 0xbc, 0x03, 0x2f, 0x00,
0x0e, 0x43, 0x06, 0x01, 0xf4, 0x03, 0x02, 0x01,
0x02, 0x07, 0x00, 0x00, 0x48, 0x03, 0xc2, 0x03,
0x00, 0x01, 0x00, 0xc4, 0x03, 0x00, 0x01, 0x00,
0xc6, 0x03, 0x01, 0x00, 0x20, 0x61, 0x00, 0x00,
0x38, 0x95, 0x00, 0x00, 0x00, 0x42, 0xa0, 0x02,
0x00, 0x00, 0xd1, 0xbd, 0x0a, 0x24, 0x02, 0x00,
0xc9, 0x38, 0x95, 0x00, 0x00, 0x00, 0x42, 0x1b,
0x02, 0x00, 0x00, 0x62, 0x00, 0x00, 0x24, 0x01,
0x00, 0xea, 0x1f, 0x38, 0x94, 0x00, 0x00, 0x00,
0x11, 0x04, 0xa1, 0x02, 0x00, 0x00, 0x42, 0x5c,
0x00, 0x00, 0x00, 0xd1, 0x04, 0xa2, 0x02, 0x00,
0x00, 0xd2, 0x24, 0x03, 0x00, 0x21, 0x01, 0x00,
0x2f, 0x62, 0x00, 0x00, 0x28, 0xbc, 0x03, 0x2f,
0x00,
0x0e, 0x29, 0xc9, 0x6c, 0x24, 0x00, 0x00, 0x00,
0x38, 0x32, 0x01, 0x00, 0x00, 0x42, 0xbc, 0x01,
0x00, 0x00, 0xc5, 0x24, 0x01, 0x00, 0x0e, 0x38,
0xfb, 0x00, 0x00, 0x00, 0x42, 0x3c, 0x01, 0x00,
0x00, 0xb6, 0x24, 0x01, 0x00, 0x0e, 0x0e, 0x29,
0x2f, 0xbc, 0x03, 0x2f, 0x00, 0x0e, 0x43, 0x06,
0x01, 0xf4, 0x03, 0x02, 0x01, 0x02, 0x07, 0x00,
0x00, 0x48, 0x03, 0xc2, 0x03, 0x00, 0x01, 0x00,
0xc4, 0x03, 0x00, 0x01, 0x00, 0xc6, 0x03, 0x01,
0x00, 0x20, 0x61, 0x00, 0x00, 0x38, 0x95, 0x00,
0x00, 0x00, 0x42, 0xa0, 0x02, 0x00, 0x00, 0xd1,
0xbd, 0x0a, 0x24, 0x02, 0x00, 0xc9, 0x38, 0x95,
0x00, 0x00, 0x00, 0x42, 0x1b, 0x02, 0x00, 0x00,
0x62, 0x00, 0x00, 0x24, 0x01, 0x00, 0xea, 0x1f,
0x38, 0x94, 0x00, 0x00, 0x00, 0x11, 0x04, 0xa1,
0x02, 0x00, 0x00, 0x42, 0x5c, 0x00, 0x00, 0x00,
0xd1, 0x04, 0xa2, 0x02, 0x00, 0x00, 0xd2, 0x24,
0x03, 0x00, 0x21, 0x01, 0x00, 0x2f, 0x62, 0x00,
0x00, 0x28, 0xbc, 0x03, 0x2f, 0x00,
};

4 changes: 1 addition & 3 deletions src/js/run-main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@ if (options.help) {
try {
internals.core.evalFile(filename);
} catch (e) {
if (e instanceof SyntaxError) {
console.error(e);
}
console.error(e);

tjs.exit(1);
}
Expand Down

0 comments on commit 90b2061

Please sign in to comment.