Error handling bugfix: pass #2
This commit is contained in:
+6
-5
@@ -162,11 +162,12 @@ export default async function watcherEsbuildCTX() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
logBuildErrorsOnce([
|
// A "Build failed with N errors" rejection is the same
|
||||||
{
|
// failure the tracker's onEnd already reported (deduped).
|
||||||
text: `Watcher rebuild failed: ${error?.message || String(error)}`,
|
const msg = String(error?.message || error || "");
|
||||||
},
|
if (!msg.startsWith("Build failed with")) {
|
||||||
], (line) => log.error(line));
|
logBuildErrorsOnce([{ text: `Watcher rebuild failed: ${msg}` }], (line) => log.error(line));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
if (owns_recompile) {
|
if (owns_recompile) {
|
||||||
|
|||||||
@@ -77,7 +77,6 @@ export default async function grabPageComponent(params) {
|
|||||||
}
|
}
|
||||||
if (!bundledMap?.path) {
|
if (!bundledMap?.path) {
|
||||||
const errMsg = `No Bundled File Path for this request path!`;
|
const errMsg = `No Bundled File Path for this request path!`;
|
||||||
log.error(errMsg);
|
|
||||||
throw new Error(errMsg);
|
throw new Error(errMsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -207,16 +207,15 @@ export default async function watcherEsbuildCTX() {
|
|||||||
msg: `${type} ${action}: ${filename}. Rebuilding ...`,
|
msg: `${type} ${action}: ${filename}. Rebuilding ...`,
|
||||||
});
|
});
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
logBuildErrorsOnce(
|
// A "Build failed with N errors" rejection is the same
|
||||||
[
|
// failure the tracker's onEnd already reported (deduped).
|
||||||
{
|
const msg = String(error?.message || error || "");
|
||||||
text: `Watcher rebuild failed: ${
|
if (!msg.startsWith("Build failed with")) {
|
||||||
error?.message || String(error)
|
logBuildErrorsOnce(
|
||||||
}`,
|
[{ text: `Watcher rebuild failed: ${msg}` }],
|
||||||
},
|
(line) => log.error(line),
|
||||||
],
|
);
|
||||||
(line) => log.error(line),
|
}
|
||||||
);
|
|
||||||
} finally {
|
} finally {
|
||||||
if (owns_recompile) {
|
if (owns_recompile) {
|
||||||
global.BUNEXT_RECOMPILING = false;
|
global.BUNEXT_RECOMPILING = false;
|
||||||
|
|||||||
@@ -131,7 +131,6 @@ export default async function grabPageComponent(
|
|||||||
|
|
||||||
if (!bundledMap?.path) {
|
if (!bundledMap?.path) {
|
||||||
const errMsg = `No Bundled File Path for this request path!`;
|
const errMsg = `No Bundled File Path for this request path!`;
|
||||||
log.error(errMsg);
|
|
||||||
throw new Error(errMsg);
|
throw new Error(errMsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user