Skip to content

Commit

Permalink
make sure to always throw error in JS
Browse files Browse the repository at this point in the history
  • Loading branch information
insipx committed Aug 13, 2024
1 parent 0a3189c commit dc3b588
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions diesel-wasm-sqlite/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ export class SQLite {
return this.sqlite3.finalize(stmt);
} catch (error) {
console.log("stmt error");
throw error;
}
}

Expand Down Expand Up @@ -271,8 +272,9 @@ export class SQLite {
try {
return this.sqlite3.exec(database, query);
console.log("Batch exec'ed");
} catch {
} catch (error) {
console.log("exec err");
throw error;
}
}

Expand All @@ -298,8 +300,9 @@ export class SQLite {
xFinal,
);
console.log("create function");
} catch {
} catch (error) {
console.log("create function err");
throw error;
}
}
//TODO: At some point need a way to register functions from rust
Expand Down

0 comments on commit dc3b588

Please sign in to comment.