Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
143437f
feat(blaze): Add visual error indicator for development
wreiske Nov 25, 2025
e274362
Improve error reporting in HTML compiler and bump versions
wreiske Dec 10, 2025
3a7de68
Merge branch 'master' into feature/error-indicator
jankapunkt Dec 17, 2025
5c83dd9
Merge branch 'master' into feature/error-indicator
wreiske Mar 8, 2026
836acf4
Merge branch 'release-3.1.0' into feature/error-indicator
jankapunkt Mar 20, 2026
9578a36
Merge branch 'release-3.1.0' into feature/error-indicator
jankapunkt Mar 29, 2026
84936c8
Merge branch 'release-3.1.0' into feature/error-indicator
wreiske Apr 3, 2026
0530e6f
fix: preserve original throw behavior in lookup.js
wreiske Apr 3, 2026
eeb3b42
fix(spacebars): Gracefully handle missing template errors in Spacebar…
wreiske Apr 3, 2026
54d3ade
fix(templating-tools): Gracefully handle Spacebars compile errors ins…
wreiske Apr 3, 2026
c15b72e
fix(blaze): Gracefully handle render errors in view autorun
wreiske Apr 3, 2026
4454e0c
fix: gate graceful error fallback to development only, catch binding …
wreiske Apr 3, 2026
fa7b5db
refactor: DRY up error placeholders, fix memory leak, fix test failures
wreiske Apr 3, 2026
b042391
fix: restore try/catch in builtins.js _createBinding with _throwNextE…
wreiske Apr 3, 2026
1d4938d
Merge branch 'release-3.1.0' into feature/error-indicator
jankapunkt Apr 9, 2026
15c3b0c
fix: revert version number bumps per maintainer request
wreiske Apr 9, 2026
65b6abc
Merge branch 'release-3.1.0' into feature/error-indicator
jankapunkt Apr 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions packages/blaze-hot/update-templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,24 @@ let templateViewPrefix = 'Template.';
// Overrides the default _applyHmrChanges with one that updates the specific
// views for modified templates instead of updating everything.
Template._applyHmrChanges = function (templateName = UpdateAll) {
// Integration with Blaze Error Indicator:
// When templates are updated via HMR, clear any related errors.
// This provides a better developer experience by automatically
// clearing "No such template" errors when the missing template is added.
if (typeof Blaze !== 'undefined' && Blaze._errorIndicator) {
if (templateName === UpdateAll) {
// Full update: clear all errors since the entire view tree is refreshed
if (typeof Blaze._errorIndicator.clearAll === 'function') {
Blaze._errorIndicator.clearAll();
}
} else {
// Targeted update: only clear errors related to this specific template
if (typeof Blaze._errorIndicator.removeTemplateError === 'function') {
Blaze._errorIndicator.removeTemplateError(templateName);
}
}
}

if (templateName === UpdateAll || lastUpdateFailed) {
lastUpdateFailed = false;
clearTimeout(timeout);
Expand Down
23 changes: 23 additions & 0 deletions packages/blaze/blaze.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,28 @@ declare module 'meteor/blaze' {
function toHTML(templateOrView: Template | View): string;

function toHTMLWithData(templateOrView: Template | View, data: Object | Function): string;

/**
* Enable or disable the visual error indicator for Blaze errors.
* @param enabled Whether to enable the error indicator (default: true)
*/
function showErrorIndicator(enabled?: boolean): void;

/**
* Clear all errors from the error indicator.
*/
function clearErrors(): void;

/**
* Get the current list of Blaze errors.
* @returns Array of error objects
*/
function getErrors(): Array<{
id: number;
message: string;
error: string;
stack: string;
time: string;
}>;
}
}
11 changes: 10 additions & 1 deletion packages/blaze/builtins.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,16 @@ function _createBinding(view, binding, displayName, mapper) {
const reactiveVar = new ReactiveVar(undefined, _isEqualBinding);
if (typeof binding === 'function') {
view.autorun(
() => _setBindingValue(reactiveVar, binding(), mapper),
() => {
try {
_setBindingValue(reactiveVar, binding(), mapper);
} catch (e) {
if (Blaze._throwNextException) {
throw e;
}
Blaze._reportException(e, 'Exception in template binding:');
}
},
view.parentView,
displayName,
);
Expand Down
Loading