Skip to content

Commit

Permalink
#1270: improve error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
JoernBerkefeld committed Jun 2, 2024
1 parent 25fcca2 commit 473c970
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/util/replaceContentBlockReference.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ export default class ReplaceContentBlockReference {
*/
static replaceReference(str, parentName, fromList, to) {
if (!str) {
return str;
const ex = new Error('No string provided');
ex.code = 200;
throw ex;
}
fromList ||= Util.OPTIONS.referenceFrom;
to ||= Util.OPTIONS.referenceTo;
Expand Down

0 comments on commit 473c970

Please sign in to comment.