module Errors # It's likely that many 'unknown server errors' are actually errors from # the Perforce server. This exception allows your client code to inspect # the returned information to **potentially** handle issues the API code # was unable to deal with. This can happen in cases of funky Perforce # server configurations. # # Expect at least one message describing the problem. Each message contains # 3 attributes: 'MessageCode', 'MessageSeverity', and 'MessageText'. You # probably should only use the message code for any error handling logic, # reserving the other fields for diagnostic usage. class PerforceProblem < Exception attr_accessor :messages def initialize(messages) @messages = messages end def to_s "PerforceProblem<@messages:[#{@messages}]>" end end end