mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
Propagate errors
This commit is contained in:
parent
5a61862008
commit
1ea049f995
@ -121,7 +121,7 @@ const emitTypeScript = () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (child.status !== 0) {
|
if (child.status !== 0) {
|
||||||
console.error("Failed to execute tsc")
|
throw new Error("Failed to execute tsc")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,7 +154,7 @@ const wasmPack = () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (cargo.status !== 0) {
|
if (cargo.status !== 0) {
|
||||||
console.error("Failed to execute cargo build")
|
throw new Error("Failed to execute cargo build")
|
||||||
}
|
}
|
||||||
|
|
||||||
let wasmbindgen = spawnSync('wasm-bindgen', [
|
let wasmbindgen = spawnSync('wasm-bindgen', [
|
||||||
@ -170,7 +170,7 @@ const wasmPack = () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (wasmbindgen.status !== 0) {
|
if (wasmbindgen.status !== 0) {
|
||||||
console.error("Failed to execute wasm-bindgen")
|
throw new Error("Failed to execute wasm-bindgen")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (release) {
|
if (release) {
|
||||||
@ -186,10 +186,9 @@ const wasmPack = () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (wasmOpt.status !== 0) {
|
if (wasmOpt.status !== 0) {
|
||||||
console.error("Failed to execute wasm-opt")
|
throw new Error("Failed to execute wasm-opt")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const watchResult = async (result) => {
|
const watchResult = async (result) => {
|
||||||
@ -260,4 +259,8 @@ const start = async () => {
|
|||||||
emitTypeScript();
|
emitTypeScript();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
const _ = start()
|
const _ = start()
|
||||||
|
} catch (e) {
|
||||||
|
console.log("Failed to start building: " + e.message)
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user