|
|
@ -8,6 +8,7 @@ |
|
|
using System; |
|
|
using System; |
|
|
using System.Collections.Generic; |
|
|
using System.Collections.Generic; |
|
|
using System.Globalization; |
|
|
using System.Globalization; |
|
|
|
|
|
using Esprima; |
|
|
using Jint; |
|
|
using Jint; |
|
|
using Jint.Native; |
|
|
using Jint.Native; |
|
|
using Jint.Native.Date; |
|
|
using Jint.Native.Date; |
|
|
@ -121,6 +122,10 @@ namespace Squidex.Domain.Apps.Core.Scripting |
|
|
{ |
|
|
{ |
|
|
throw new ValidationException($"Failed to execute script with javascript syntax error: {ex.Message}", new ValidationError(ex.Message)); |
|
|
throw new ValidationException($"Failed to execute script with javascript syntax error: {ex.Message}", new ValidationError(ex.Message)); |
|
|
} |
|
|
} |
|
|
|
|
|
catch (ParserException ex) |
|
|
|
|
|
{ |
|
|
|
|
|
throw new ValidationException($"Failed to execute script with javascript error: {ex.Message}", new ValidationError(ex.Message)); |
|
|
|
|
|
} |
|
|
catch (JavaScriptException ex) |
|
|
catch (JavaScriptException ex) |
|
|
{ |
|
|
{ |
|
|
throw new ValidationException($"Failed to execute script with javascript error: {ex.Message}", new ValidationError(ex.Message)); |
|
|
throw new ValidationException($"Failed to execute script with javascript error: {ex.Message}", new ValidationError(ex.Message)); |
|
|
|