admin
2020-06-10 a610f2ab6e543d2cb78c1ef212ac6a74ddc067d9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// 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
{
    /// <summary>
    /// Class representing a V8 exception.
    /// </summary>
    public class V8Exception
    {
        /// <summary>
        /// Returns the index within the line of the last character where the error occurred.
        /// </summary>
        /// <returns>Returns the index within the line of the last character where the error occurred.</returns>
        public int EndColumn { get; private set; }
 
        /// <summary>
        /// Returns the index within the script of the last character where the error occurred.
        /// </summary>
        /// <returns>Returns the index within the script of the last character where the error occurred.</returns>
        public int EndPosition { get; private set; }
 
        /// <summary>
        /// Returns the 1-based number of the line where the error occurred or 0 if the line number is unknown.
        /// </summary>
        /// <returns>Returns the 1-based number of the line where the error occurred or 0 if the line number is unknown.</returns>
        public int LineNumber { get; private set; }
 
        /// <summary>
        /// Returns the exception message.
        /// </summary>
        /// <returns>Returns the exception message.</returns>
        public string Message { get; private set;}
 
        /// <summary>
        /// Returns the resource name for the script from where the function causing the error originates.
        /// </summary>
        /// <returns>Returns the resource name for the script from where the function causing the error originates.</returns>
        public string ScriptResourceName { get; private set; }
 
        /// <summary>
        /// Returns the line of source code that the exception occurred within.
        /// </summary>
        /// <returns>Returns the line of source code that the exception occurred within.</returns>
        public string SourceLine { get; private set; }
 
        /// <summary>
        /// Returns the index within the line of the first character where the error occurred.
        /// </summary>
        /// <returns>Returns the index within the line of the first character where the error occurred.</returns>
        public int StartColumn { get; private set; }
 
        /// <summary>
        /// Returns the index within the script of the first character where the error occurred.
        /// </summary>
        /// <returns>Returns the index within the script of the first character where the error occurred.</returns>
        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;
        }
 
    }
}