-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More robust infinite recursion handling with custom exception (#7882)
* 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.
- Loading branch information
Showing
5 changed files
with
92 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/*\ | ||
title: $:/core/modules/utils/errors.js | ||
type: application/javascript | ||
module-type: utils | ||
Custom errors for TiddlyWiki. | ||
\*/ | ||
(function(){ | ||
|
||
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; | ||
|
||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters