Skip to content

Commit

Permalink
fix: improve some error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
jaromil committed Jan 11, 2025
1 parent 4cefabd commit 7affe2b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cjit.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,20 +464,20 @@ bool cjit_add_file(CJITState *cjit, const char *path) {
int is_source = has_source_extension(path);
if(is_source == 0) { // no extension, we still add
if(tcc_add_file(tcc(cjit), path)<0) {
fail(path);
_err("%s: error: %s",__func__, path);
return false;
}
return true;
}
if(is_source>0) {
if(!cjit_add_source(cjit, path)) {
fail(path);
_err("%s: error: %s",__func__, path);
return false;
}
return true;
} else {
if(tcc_add_file(tcc(cjit), path)<0) {
fail(path);
_err("%s: error: %s",__func__, path);
return false;
}
}
Expand Down

0 comments on commit 7affe2b

Please sign in to comment.