mirror of
https://github.com/pion/webrtc.git
synced 2025-10-04 06:46:35 +08:00
API: Initial api structure for creating datachannel and sctp information.
This commit is contained in:
28
errors.go
28
errors.go
@@ -91,5 +91,33 @@ func (e *SyntaxError) Error() string {
|
||||
return fmt.Sprintf("syntax error: %v", e.Err)
|
||||
}
|
||||
|
||||
// Types of TypeError
|
||||
var (
|
||||
ErrInvalidValue = errors.New("invalid value")
|
||||
)
|
||||
|
||||
// TypeError indicates an issue with a supplied value
|
||||
type TypeError struct {
|
||||
Err error
|
||||
}
|
||||
|
||||
func (e *SyntaxError) Error() string {
|
||||
return fmt.Sprintf("type error: %v", e.Err)
|
||||
}
|
||||
|
||||
// Types of OperationError
|
||||
var (
|
||||
ErrMaxDataChannels = errors.New("maximum number of datachannels reached")
|
||||
)
|
||||
|
||||
// OperationError indicates an issue with execution
|
||||
type OperationError struct {
|
||||
Err error
|
||||
}
|
||||
|
||||
func (e *SyntaxError) Error() string {
|
||||
return fmt.Sprintf("operation error: %v", e.Err)
|
||||
}
|
||||
|
||||
// ErrUnknownType indicates a Unknown info
|
||||
var ErrUnknownType = errors.New("Unknown")
|
||||
|
Reference in New Issue
Block a user