Skip to content

Unhandled exception when JS exception is thrown #59

@dustinsoftware

Description

@dustinsoftware

A teammate got a crash when an exception was thrown. Unfortunately I do not have a repro for this.

Unhandled Exception: System.ArgumentOutOfRangeException: Index and length must refer to a location within the string. 
Parameter name: length
 at System.String.Substring(Int32 startIndex, Int32 length)
 at JavaScriptEngineSwitcher.Core.Helpers.JsErrorHelpers.GetSourceFragment(String source, Int32 position, Int32 length, Int32 columnNumber, Int32 maxFragmentLength)
 at JavaScriptEngineSwitcher.Core.Helpers.JsErrorHelpers.GetSourceFragmentFromLine(String sourceLine, Int32 columnNumber, Int32 maxFragmentLength)
 at JavaScriptEngineSwitcher.ChakraCore.ChakraCoreJsEngine.WrapJsException(JsException originalException, String defaultDocumentName)
 at JavaScriptEngineSwitcher.ChakraCore.ChakraCoreJsEngine.<>c__DisplayClass46_0.<InnerExecute>b__0()
 at JavaScriptEngineSwitcher.ChakraCore.ScriptDispatcher.<>c__DisplayClass11_0.<Invoke>b__0()
 at JavaScriptEngineSwitcher.ChakraCore.ScriptDispatcher.StartThread()

Current package versions

<package id="JavaScriptEngineSwitcher.ChakraCore" version="3.0.0-beta7" targetFramework="net47" />
<package id="JavaScriptEngineSwitcher.ChakraCore.Native.win-x64" version="2.4.22" targetFramework="net47" />
<package id="JavaScriptEngineSwitcher.Core" version="3.0.0-beta4" targetFramework="net47" />

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions