Skip to content

Commit 40dd0f8

Browse files
committed
1. Format of the error messages was unified;
2. Created a new exception classes: `JsCompilationException`, `JsEngineException`, `JsFatalException`, `JsTimeoutException` and `JsUsageException`. These exceptions are responsible for handling errors, some of which were previously handled by the `JsRuntimeException` class; 3. In the `JsException` class was added two new properties: `Category` and `Description`; 4. From the `JsRuntimeException` class was removed one property - `ErrorCode`; 5. In the `JsRuntimeException` class was added three new properties: `Type`, `DocumentName` and `CallStack`; 6. `JsScriptInterruptedException` class was renamed to the `JsInterruptedException` class and now is inherited from the `JsRuntimeException` class; 7. `JsEngineLoadException` class now is inherited from the `JsEngineException` class; 8. `Format` method of the `JsErrorHelpers` class was renamed to the `GenerateErrorDetails`; 9. In JavaScriptEngineSwitcher.Msie added support of MSIE JavaScript Engine version 3.0.0 Beta 1.
1 parent 8eaea45 commit 40dd0f8

File tree

130 files changed

+6435
-1939
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+6435
-1939
lines changed

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "2.1.3"
3+
"version": "2.1.103"
44
}
55
}

samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[assembly: AssemblyConfiguration("")]
77
[assembly: AssemblyCompany("")]
88
[assembly: AssemblyProduct("JS Engine Switcher: Sample ASP.NET MVC 4 Site")]
9-
[assembly: AssemblyCopyright("Copyright © 2013-2017 Andrey Taritsyn")]
9+
[assembly: AssemblyCopyright("Copyright © 2013-2018 Andrey Taritsyn")]
1010
[assembly: AssemblyTrademark("")]
1111
[assembly: AssemblyCulture("")]
1212

samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<VersionPrefix>3.0.0</VersionPrefix>
66
<VersionSuffix>alpha8</VersionSuffix>
77
<TargetFramework>netcoreapp1.0</TargetFramework>
8-
<RuntimeFrameworkVersion>1.0.8</RuntimeFrameworkVersion>
8+
<RuntimeFrameworkVersion>1.0.9</RuntimeFrameworkVersion>
99
<OutputType>Exe</OutputType>
1010
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
1111
<PreserveCompilationContext>true</PreserveCompilationContext>

samples/JavaScriptEngineSwitcher.Sample.Logic/Services/JsEvaluationService.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,7 @@ public JsEvaluationViewModel Evaluate(JsEvaluationViewModel model)
7373
engine = _engineSwitcher.CreateEngine(model.EngineName);
7474
result.Value = engine.Evaluate<string>(model.Expression);
7575
}
76-
catch (JsEngineLoadException e)
77-
{
78-
var error = GetJsEvaluationErrorFromException(e);
79-
result.Errors.Add(error);
80-
}
81-
catch (JsRuntimeException e)
76+
catch (JsScriptException e)
8277
{
8378
var error = GetJsEvaluationErrorFromException(e);
8479
error.LineNumber = e.LineNumber;
@@ -87,6 +82,11 @@ public JsEvaluationViewModel Evaluate(JsEvaluationViewModel model)
8782

8883
result.Errors.Add(error);
8984
}
85+
catch (JsException e)
86+
{
87+
var error = GetJsEvaluationErrorFromException(e);
88+
result.Errors.Add(error);
89+
}
9090
finally
9191
{
9292
if (engine != null)

src/JavaScriptEngineSwitcher.ChakraCore.Native.debian-x64/JavaScriptEngineSwitcher.ChakraCore.Native.debian-x64.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1414
<description>This package is deprecated. Instead, it is recommended to use a 'JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64' package.</description>
1515
<releaseNotes>ChakraCore was updated to version 1.7.5.</releaseNotes>
16-
<copyright>Copyright © 2013-2017 Andrey Taritsyn</copyright>
16+
<copyright>Copyright © 2013-2018 Andrey Taritsyn</copyright>
1717
<language>en-US</language>
1818
<tags>JavaScriptEngineSwitcher JavaScript ECMAScript ChakraCore Debian Ubuntu LinuxMint x64</tags>
1919
</metadata>

src/JavaScriptEngineSwitcher.ChakraCore.Native.debian-x64/readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
--------------------------------------------------------------------------------
77

8-
Copyright (c) 2013-2017 Andrey Taritsyn - http://www.taritsyn.ru
8+
Copyright (c) 2013-2018 Andrey Taritsyn - http://www.taritsyn.ru
99

1010

1111
===========

src/JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64/JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
This package is only compatible with .NET Core.</description>
1717
<releaseNotes>ChakraCore was updated to version 1.7.5.</releaseNotes>
18-
<copyright>Copyright © 2013-2017 Andrey Taritsyn</copyright>
18+
<copyright>Copyright © 2013-2018 Andrey Taritsyn</copyright>
1919
<language>en-US</language>
2020
<tags>JavaScriptEngineSwitcher JavaScript ECMAScript ChakraCore Linux x64</tags>
2121
</metadata>

src/JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64/readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
--------------------------------------------------------------------------------
77

8-
Copyright (c) 2013-2017 Andrey Taritsyn - http://www.taritsyn.ru
8+
Copyright (c) 2013-2018 Andrey Taritsyn - http://www.taritsyn.ru
99

1010

1111
===========

src/JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64/JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
This package is only compatible with .NET Core.</description>
1717
<releaseNotes>ChakraCore was updated to version 1.7.5.</releaseNotes>
18-
<copyright>Copyright © 2013-2017 Andrey Taritsyn</copyright>
18+
<copyright>Copyright © 2013-2018 Andrey Taritsyn</copyright>
1919
<language>en-US</language>
2020
<tags>JavaScriptEngineSwitcher JavaScript ECMAScript ChakraCore macOS OSX x64</tags>
2121
</metadata>

src/JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64/readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
--------------------------------------------------------------------------------
77

8-
Copyright (c) 2013-2017 Andrey Taritsyn - http://www.taritsyn.ru
8+
Copyright (c) 2013-2018 Andrey Taritsyn - http://www.taritsyn.ru
99

1010

1111
===========

0 commit comments

Comments
 (0)