// Copyright © 2019 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
namespace CefSharp.RenderProcess
{
///
/// Class representing a V8 exception.
///
public class V8Exception
{
///
/// Returns the index within the line of the last character where the error occurred.
///
/// Returns the index within the line of the last character where the error occurred.
public int EndColumn { get; private set; }
///
/// Returns the index within the script of the last character where the error occurred.
///
/// Returns the index within the script of the last character where the error occurred.
public int EndPosition { get; private set; }
///
/// Returns the 1-based number of the line where the error occurred or 0 if the line number is unknown.
///
/// Returns the 1-based number of the line where the error occurred or 0 if the line number is unknown.
public int LineNumber { get; private set; }
///
/// Returns the exception message.
///
/// Returns the exception message.
public string Message { get; private set;}
///
/// Returns the resource name for the script from where the function causing the error originates.
///
/// Returns the resource name for the script from where the function causing the error originates.
public string ScriptResourceName { get; private set; }
///
/// Returns the line of source code that the exception occurred within.
///
/// Returns the line of source code that the exception occurred within.
public string SourceLine { get; private set; }
///
/// Returns the index within the line of the first character where the error occurred.
///
/// Returns the index within the line of the first character where the error occurred.
public int StartColumn { get; private set; }
///
/// Returns the index within the script of the first character where the error occurred.
///
/// Returns the index within the script of the first character where the error occurred.
public int StartPosition { get; private set; }
public V8Exception(int endColumn,
int endPosition,
int lineNumber,
string message,
string scriptResourceName,
string sourceLine,
int startColumn,
int startPosition)
{
EndColumn = endColumn;
EndPosition = endPosition;
LineNumber = lineNumber;
Message = message;
ScriptResourceName = scriptResourceName;
SourceLine = sourceLine;
StartColumn = startColumn;
StartPosition = startPosition;
}
}
}