Avoid a backtrace when we try to create a ParserError without an upstream error

This commit is contained in:
Nick Thomas
2011-11-13 19:48:18 +00:00
parent 875820f011
commit ce41993a1b

View File

@@ -17,7 +17,7 @@ module QMPClient
# Raised when we're trying to convert raw text into a message, but failing
class ParserError < StandardError
attr_reader :upstream_error
def initialize(message, upstream)
def initialize(message, upstream = nil)
super(message)
@upstream_error = upstream
end