Avoid a backtrace when we try to create a ParserError without an upstream error
This commit is contained in:
@@ -17,7 +17,7 @@ module QMPClient
|
|||||||
# Raised when we're trying to convert raw text into a message, but failing
|
# Raised when we're trying to convert raw text into a message, but failing
|
||||||
class ParserError < StandardError
|
class ParserError < StandardError
|
||||||
attr_reader :upstream_error
|
attr_reader :upstream_error
|
||||||
def initialize(message, upstream)
|
def initialize(message, upstream = nil)
|
||||||
super(message)
|
super(message)
|
||||||
@upstream_error = upstream
|
@upstream_error = upstream
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user