Skip to content

Commit

Permalink
Improve validation error
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Jun 26, 2024
1 parent c881bc8 commit 8f82b69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const allUrlsRegex = /^(https?|file|ftp):[/]+/;

export function assertValidPattern(matchPattern: string): void {
if (!isValidPattern(matchPattern)) {
throw new Error(matchPattern + ' is an invalid pattern, it must match ' + String(patternValidationRegex));
throw new Error(matchPattern + ' is an invalid pattern. See https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Match_patterns for more info.');
}
}

Expand Down

0 comments on commit 8f82b69

Please sign in to comment.