Sha256: 2c70d8fa6390ab1d26273dd12471a6d0faeb8be142e285ca34afb76279f523b7
Contents?: true
Size: 663 Bytes
Versions: 1
Compression:
Stored size: 663 Bytes
Contents
class ErrorReporter < Controller self.define do on error Plugin::Thumbnailer::UnsupportedMediaTypeError do |error| write_error 415, error end on error( Plugin::Thumbnailer::ImageTooLargeError, MemoryLimit::MemoryLimitedExceededError ) do |error| write_error 413, error end on error( ThumbnailSpec::InvalidFormatError, Plugin::Thumbnailer::ZeroSizedImageError, Plugin::Thumbnailer::UnsupportedMethodError, Plugin::Thumbnailer::InvalidColorNameError, Plugin::Thumbnailer::ThumbnailArgumentError, Plugin::Thumbnailer::EditArgumentError ) do |error| write_error 400, error end run DefaultErrorReporter end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
httpthumbnailer-1.3.0 | lib/httpthumbnailer/error_reporter.rb |