1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2026-02-06 02:00:23 +00:00
Files
TiddlyWiki5/core/modules/utils/errors.js
Cameron Fischer 9d5be2e9f8 Recurse exception handling to better handle '{{}}' in place of recently installed fix (#9548)
* Introduced preliminary idea for infinite recurse exception

* Better handling of infinite recursion

But it could be better still...

* the TransclusionError is a proper error

Moved the magic number to be on the error's class. Not sure if that's
a great idea.

* Fixed minor minor issue that came up in conflict

The minor fix to the jasmine regexp that escaped a '+' somehow
broke some random test.

* Removing patch fix for recursion errors

* Fixed issue where buttton and other widgets don't clean up

* Added release notes for #9548

* Update test-widget.js

If I don't fix those indentations, the entire TW codebase will explode or soemthing.

* Update test-widget.js

These lint problems are wasting my time.

* Fixed all core widgets to not leak when renderChildren fails

* Updated release notes to reflect what I'm actually fixing

* Update test-widget.js

Added warning not to use for-of loop for defining tests. The iterating variable needs to have its own method scope, or it risks being the same value for all tests.
2026-02-04 11:21:16 +00:00

21 lines
490 B
JavaScript

/*\
title: $:/core/modules/utils/errors.js
type: application/javascript
module-type: utils
Custom errors for TiddlyWiki.
\*/
function TranscludeRecursionError() {
Error.apply(this,arguments);
this.signatures = Object.create(null);
};
/* Maximum permitted depth of the widget tree for recursion detection */
TranscludeRecursionError.MAX_WIDGET_TREE_DEPTH = 1000;
TranscludeRecursionError.prototype = Object.create(Error);
exports.TranscludeRecursionError = TranscludeRecursionError;