// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
// SPDX-License-Identifier: MIT

// Package rtcerr implements the error wrappers defined throughout the // WebRTC 1.0 specifications.
package rtcerr import ( ) // UnknownError indicates the operation failed for an unknown transient reason. type UnknownError struct { Err error } func ( *UnknownError) () string { return fmt.Sprintf("UnknownError: %v", .Err) } // Unwrap returns the result of calling the Unwrap method on err, if err's type contains // an Unwrap method returning error. Otherwise, Unwrap returns nil. func ( *UnknownError) () error { return .Err } // InvalidStateError indicates the object is in an invalid state. type InvalidStateError struct { Err error } func ( *InvalidStateError) () string { return fmt.Sprintf("InvalidStateError: %v", .Err) } // Unwrap returns the result of calling the Unwrap method on err, if err's type contains // an Unwrap method returning error. Otherwise, Unwrap returns nil. func ( *InvalidStateError) () error { return .Err } // InvalidAccessError indicates the object does not support the operation or // argument. type InvalidAccessError struct { Err error } func ( *InvalidAccessError) () string { return fmt.Sprintf("InvalidAccessError: %v", .Err) } // Unwrap returns the result of calling the Unwrap method on err, if err's type contains // an Unwrap method returning error. Otherwise, Unwrap returns nil. func ( *InvalidAccessError) () error { return .Err } // NotSupportedError indicates the operation is not supported. type NotSupportedError struct { Err error } func ( *NotSupportedError) () string { return fmt.Sprintf("NotSupportedError: %v", .Err) } // Unwrap returns the result of calling the Unwrap method on err, if err's type contains // an Unwrap method returning error. Otherwise, Unwrap returns nil. func ( *NotSupportedError) () error { return .Err } // InvalidModificationError indicates the object cannot be modified in this way. type InvalidModificationError struct { Err error } func ( *InvalidModificationError) () string { return fmt.Sprintf("InvalidModificationError: %v", .Err) } // Unwrap returns the result of calling the Unwrap method on err, if err's type contains // an Unwrap method returning error. Otherwise, Unwrap returns nil. func ( *InvalidModificationError) () error { return .Err } // SyntaxError indicates the string did not match the expected pattern. type SyntaxError struct { Err error } func ( *SyntaxError) () string { return fmt.Sprintf("SyntaxError: %v", .Err) } // Unwrap returns the result of calling the Unwrap method on err, if err's type contains // an Unwrap method returning error. Otherwise, Unwrap returns nil. func ( *SyntaxError) () error { return .Err } // TypeError indicates an error when a value is not of the expected type. type TypeError struct { Err error } func ( *TypeError) () string { return fmt.Sprintf("TypeError: %v", .Err) } // Unwrap returns the result of calling the Unwrap method on err, if err's type contains // an Unwrap method returning error. Otherwise, Unwrap returns nil. func ( *TypeError) () error { return .Err } // OperationError indicates the operation failed for an operation-specific // reason. type OperationError struct { Err error } func ( *OperationError) () string { return fmt.Sprintf("OperationError: %v", .Err) } // Unwrap returns the result of calling the Unwrap method on err, if err's type contains // an Unwrap method returning error. Otherwise, Unwrap returns nil. func ( *OperationError) () error { return .Err } // NotReadableError indicates the input/output read operation failed. type NotReadableError struct { Err error } func ( *NotReadableError) () string { return fmt.Sprintf("NotReadableError: %v", .Err) } // Unwrap returns the result of calling the Unwrap method on err, if err's type contains // an Unwrap method returning error. Otherwise, Unwrap returns nil. func ( *NotReadableError) () error { return .Err } // RangeError indicates an error when a value is not in the set or range // of allowed values. type RangeError struct { Err error } func ( *RangeError) () string { return fmt.Sprintf("RangeError: %v", .Err) } // Unwrap returns the result of calling the Unwrap method on err, if err's type contains // an Unwrap method returning error. Otherwise, Unwrap returns nil. func ( *RangeError) () error { return .Err }