Exception: WebRTC::RTCError
- Inherits:
-
StandardError
- Object
- StandardError
- WebRTC::RTCError
- Defined in:
- lib/webrtc/parity_types.rb
Instance Attribute Summary collapse
-
#error_detail ⇒ Object
readonly
Returns the value of attribute error_detail.
-
#error_type ⇒ Object
readonly
Returns the value of attribute error_type.
-
#sdp_line_number ⇒ Object
readonly
Returns the value of attribute sdp_line_number.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(message:, error_type: RTCErrorType::INTERNAL, error_detail: RTCErrorDetailType::NONE, sdp_line_number: nil, status_code: nil) ⇒ RTCError
constructor
A new instance of RTCError.
- #to_h ⇒ Object
Constructor Details
#initialize(message:, error_type: RTCErrorType::INTERNAL, error_detail: RTCErrorDetailType::NONE, sdp_line_number: nil, status_code: nil) ⇒ RTCError
Returns a new instance of RTCError.
86 87 88 89 90 91 92 93 |
# File 'lib/webrtc/parity_types.rb', line 86 def initialize(message:, error_type: RTCErrorType::INTERNAL, error_detail: RTCErrorDetailType::NONE, sdp_line_number: nil, status_code: nil) super() @error_type = error_type @error_detail = error_detail @sdp_line_number = sdp_line_number @status_code = status_code end |
Instance Attribute Details
#error_detail ⇒ Object (readonly)
Returns the value of attribute error_detail.
84 85 86 |
# File 'lib/webrtc/parity_types.rb', line 84 def error_detail @error_detail end |
#error_type ⇒ Object (readonly)
Returns the value of attribute error_type.
84 85 86 |
# File 'lib/webrtc/parity_types.rb', line 84 def error_type @error_type end |
#sdp_line_number ⇒ Object (readonly)
Returns the value of attribute sdp_line_number.
84 85 86 |
# File 'lib/webrtc/parity_types.rb', line 84 def sdp_line_number @sdp_line_number end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
84 85 86 |
# File 'lib/webrtc/parity_types.rb', line 84 def status_code @status_code end |
Instance Method Details
#to_h ⇒ Object
95 96 97 98 99 100 101 102 103 |
# File 'lib/webrtc/parity_types.rb', line 95 def to_h { message: , errorType: @error_type, errorDetail: @error_detail, sdpLineNumber: @sdp_line_number, statusCode: @status_code } end |