况洋洋
2025-07-04 0d247bd2a17e0f99f3609774a1ce54ae00857997
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
// Copyright © 2020 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.
 
using System;
using System.Runtime.Serialization;
 
namespace CefSharp.DevTools
{
    /// <summary>
    /// The exception that is thrown when there's a problem executing a DevTools protocol method.
    /// </summary>
    [Serializable]
    public class DevToolsClientException : Exception
    {
        /// <summary>
        /// Get the Error Response
        /// </summary>
        public DevToolsDomainErrorResponse Response
        {
            get; private set;
        }
 
        /// <summary>
        /// Initializes a new instance of the <see cref="DevToolsClientException"/> class with its message
        /// string set to a default message.
        /// </summary>
        public DevToolsClientException() : base("Error occurred whilst executing DevTools protocol method")
        {
        }
 
        /// <summary>
        /// Initializes a new instance of the <see cref="DevToolsClientException"/> class with a specified error message.
        /// </summary>
        /// <param name="message">message</param>
        public DevToolsClientException(string message) : base(message)
        {
        }
 
        /// <summary>
        /// Initializes a new instance of the <see cref="DevToolsClientException"/> class with a specified error message.
        /// </summary>
        /// <param name="message">message</param>
        /// <param name="errorResponse">error response</param>
        public DevToolsClientException(string message, DevToolsDomainErrorResponse errorResponse) : base(message)
        {
            Response = errorResponse;
        }
 
        /// <summary>
        /// Initializes a new instance of the <see cref="DevToolsClientException"/> class with a specified error message
        /// and an inner exception.
        /// </summary>
        /// <param name="message">message</param>
        /// <param name="inner">inner exception</param>
        public DevToolsClientException(string message, Exception inner) : base(message, inner)
        {
        }
 
        /// <inheritdoc/>
        protected DevToolsClientException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext)
        {
            
        }
    }
}