1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
#
# Author:: Fletcher Nichol (<fnichol@nichol.ca>)
# Author:: Dominik Richter (<dominik.richter@gmail.com>)
# Author:: Christoph Hartmann (<chris@lollyrock.com>)
#
# Copyright (C) 2013, Fletcher Nichol
#
# Licensed under the Apache License, Version 2.0 (the "License");
module Train
# Base exception for any exception explicitly raised by the Train library.
class Error < ::StandardError
attr_reader :reason
def initialize(message = "", reason = :not_provided)
super(message)
@reason = reason
end
end
# Base exception class for all exceptions that are caused by user input
# errors.
class UserError < Error; end
# We could not load a plugin, because of a user error
class PluginLoadError < UserError
attr_accessor :transport_name
end
# Base exception class for all exceptions that are caused by incorrect use
# of an API.
class ClientError < Error; end
# Base exception class for all exceptions that are caused by other failures
# in the transport layer.
class TransportError < Error; end
# Exception for when no platform can be detected.
class PlatformDetectionFailed < Error; end
# Exception for when no uuid for the platform can be detected.
class PlatformUuidDetectionFailed < Error; end
# Exception for when a invalid cache type is passed.
class UnknownCacheType < Error; end
# Exception for when a command reaches configured timeout
class CommandTimeoutReached < Error; end
end
|