Class ErrorResult
- Namespace
- WebDriverBiDi
- Assembly
- WebDriverBiDi.dll
Object containing an error response to a command.
public record ErrorResult : CommandResult, IEquatable<CommandResult>, IEquatable<ErrorResult>
- Inheritance
-
ErrorResult
- Implements
- Inherited Members
Constructors
ErrorResult(ErrorResult)
protected ErrorResult(ErrorResult original)
Parameters
originalErrorResult
Properties
EqualityContract
protected override Type EqualityContract { get; }
Property Value
ErrorCode
Gets the error code of error encountered.
public ErrorCode ErrorCode { get; }
Property Value
ErrorMessage
Gets the message of the error.
public string ErrorMessage { get; }
Property Value
ErrorType
Gets the type of error encountered.
public string ErrorType { get; }
Property Value
IsError
Gets a value indicating whether the response data is an error.
public override bool IsError { get; }
Property Value
StackTrace
Gets the stack trace associated with this error.
public string? StackTrace { get; }
Property Value
Methods
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
Equals(CommandResult?)
public override sealed bool Equals(CommandResult? other)
Parameters
otherCommandResult
Returns
Equals(ErrorResult?)
public virtual bool Equals(ErrorResult? other)
Parameters
otherErrorResult
Returns
FromErrorInformation(string, string, string?)
Creates an ErrorResult object from the given error information.
public static ErrorResult FromErrorInformation(string errorType, string errorMessage, string? stackTrace = null)
Parameters
errorTypestringThe type of the error.
errorMessagestringThe message of the error.
stackTracestringThe stack trace associated with the error.
Returns
- ErrorResult
An ErrorResult object containing the error information.
Remarks
This method can be used to create an ErrorResult for use with WebDriverBiDiCommandException when an error is encountered for custom commands. This allows users to create extension methods that mimic the behavior of built-in commands.
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected override bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(ErrorResult?, ErrorResult?)
public static bool operator ==(ErrorResult? left, ErrorResult? right)
Parameters
leftErrorResultrightErrorResult
Returns
operator !=(ErrorResult?, ErrorResult?)
public static bool operator !=(ErrorResult? left, ErrorResult? right)
Parameters
leftErrorResultrightErrorResult