custom errors

This commit is contained in:
Artem Vasilev 2021-02-12 18:33:39 +03:00
parent c0566b7654
commit 70a563ed53
7 changed files with 10 additions and 10 deletions

4
dist/crypto-pro.js vendored
View File

@ -4116,8 +4116,8 @@ exports._extractMeaningfulErrorMessage = function (error) {
if (!containsRussianLetters) { if (!containsRussianLetters) {
return null; return null;
} }
var searchResult = errorContainer.message.match(/^(.*?)(?:(?:\.?\s?\(?0x)|(?:\.?$))/); var searchResult = errorContainer.message.match(/^(.*?)(?:(?:\.?\s?\(?(0x[0-9a-zA-Z]{1,8})\))|(?:\.?$))/);
return searchResult ? searchResult[1] : null; return (searchResult ? searchResult[1] + (searchResult[2] ? '. Код ошибки: ' + searchResult[2] : '') : null);
}; };

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -3714,8 +3714,8 @@ exports._extractMeaningfulErrorMessage = (error) => {
if (!containsRussianLetters) { if (!containsRussianLetters) {
return null; return null;
} }
const searchResult = errorContainer.message.match(/^(.*?)(?:(?:\.?\s?\(?0x)|(?:\.?$))/); const searchResult = errorContainer.message.match(/^(.*?)(?:(?:\.?\s?\(?(0x[0-9a-zA-Z]{1,8})\))|(?:\.?$))/);
return searchResult ? searchResult[1] : null; return (searchResult ? searchResult[1] + (searchResult[2] ? '. Код ошибки: ' + searchResult[2] : '') : null);
}; };

File diff suppressed because one or more lines are too long

View File

@ -15,7 +15,7 @@ export const _extractMeaningfulErrorMessage = (error: Error): string | null => {
return null; return null;
} }
const searchResult = errorContainer.message.match(/^(.*?)(?:(?:\.?\s?\(?0x)|(?:\.?$))/); const searchResult = errorContainer.message.match(/^(.*?)(?:(?:\.?\s?\(?(0x[0-9a-zA-Z]{1,8})\))|(?:\.?$))/);
return searchResult ? searchResult[1] : null; return (searchResult ? searchResult[1] + (searchResult[2] ? '. Код ошибки: ' + searchResult[2] : '') : null);
}; };