Exception: RFF::ProcessingFailure
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- RFF::ProcessingFailure
- Defined in:
- lib/exceptions.rb
Overview
This exception is thrown on FFmpeg processing error
Instance Method Summary collapse
-
#initialize(exitcode, msg = nil) ⇒ ProcessingFailure
constructor
Initializes the exception with arguments * exitcode (required) - FFmpeg exit code * msg - Message describing the error.
-
#to_s ⇒ Object
Returns message describing the error (exit code and describing message if it is present).
Constructor Details
#initialize(exitcode, msg = nil) ⇒ ProcessingFailure
Initializes the exception with arguments
-
exitcode (required) - FFmpeg exit code
-
msg - Message describing the error. Defaults to nil
16 17 18 19 |
# File 'lib/exceptions.rb', line 16 def initialize(exitcode, msg=nil) @msg = msg @exitcode = exitcode end |
Instance Method Details
#to_s ⇒ Object
Returns message describing the error (exit code and describing message if it is present)
23 24 25 26 27 28 29 |
# File 'lib/exceptions.rb', line 23 def to_s if msg.nil? exitcode.to_s else msg + exitcode.to_s end end |