Skip to content

Commit 4b58f36

Browse files
committed
In JavaScriptEngineSwitcher.Jint fixed a error that occurs in the strict mode when generating an error message
1 parent 3979ca3 commit 4b58f36

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

src/JavaScriptEngineSwitcher.Jint/JavaScriptEngineSwitcher.Jint.csproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
<Description>JavaScriptEngineSwitcher.Jint contains adapter `JintJsEngine` (wrapper for the Jint JavaScript Engine (http://github.com/sebastienros/jint) version 2.11.58).</Description>
1313
<PackageIconUrl>https://raw.githubusercontent.com/Taritsyn/JavaScriptEngineSwitcher/master/Icons/JavaScriptEngineSwitcher_Jint_Logo128x128.png</PackageIconUrl>
1414
<PackageTags>JavaScriptEngineSwitcher;JavaScript;ECMAScript;Jint</PackageTags>
15-
<PackageReleaseNotes>1. Jint was updated to version 2.11.58;
16-
2. Added a ability to pre-compile scripts;
17-
3. In configuration settings of the Jint JS engine a `Timeout` property has been replaced by the `TimeoutInterval` property (default `TimeSpan.Zero`) and was added one new property - `LocalTimeZone` (default `TimeZoneInfo.Local`);
18-
4. Added support of .NET Standard 2.0.</PackageReleaseNotes>
15+
<PackageReleaseNotes>Fixed a error that occurs in the strict mode when generating an error message.</PackageReleaseNotes>
1916
</PropertyGroup>
2017

2118
<Import Project="../../build/common.props" />

src/JavaScriptEngineSwitcher.Jint/JintJsEngine.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ private static WrapperException WrapJavaScriptException(
156156
{
157157
WrapperException wrapperException;
158158
string message = originalJavaScriptException.Message;
159+
if (string.IsNullOrWhiteSpace(message))
160+
{
161+
message = "An unknown error occurred";
162+
}
159163
string description = message;
160164
string type = string.Empty;
161165
string documentName = originalJavaScriptException.Location.Source;

src/JavaScriptEngineSwitcher.Jint/readme.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,7 @@
1717
=============
1818
RELEASE NOTES
1919
=============
20-
1. Jint was updated to version 2.11.58;
21-
2. Added a ability to pre-compile scripts;
22-
3. In configuration settings of the Jint JS engine a `Timeout` property has been
23-
replaced by the `TimeoutInterval` property (default `TimeSpan.Zero`) and was
24-
added one new property - `LocalTimeZone` (default `TimeZoneInfo.Local`);
25-
4. Added support of .NET Standard 2.0.
20+
Fixed a error that occurs in the strict mode when generating an error message.
2621

2722
=============
2823
DOCUMENTATION

0 commit comments

Comments
 (0)