// 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 { /// /// The exception that is thrown when there's a problem executing a DevTools protocol method. /// [Serializable] public class DevToolsClientException : Exception { /// /// Get the Error Response /// public DevToolsDomainErrorResponse Response { get; private set; } /// /// Initializes a new instance of the class with its message /// string set to a default message. /// public DevToolsClientException() : base("Error occurred whilst executing DevTools protocol method") { } /// /// Initializes a new instance of the class with a specified error message. /// /// message public DevToolsClientException(string message) : base(message) { } /// /// Initializes a new instance of the class with a specified error message. /// /// message /// error response public DevToolsClientException(string message, DevToolsDomainErrorResponse errorResponse) : base(message) { Response = errorResponse; } /// /// Initializes a new instance of the class with a specified error message /// and an inner exception. /// /// message /// inner exception public DevToolsClientException(string message, Exception inner) : base(message, inner) { } /// protected DevToolsClientException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { } } }