Exception: Canon::SizeLimitExceededError

Inherits:
Error
  • Object
show all
Defined in:
lib/canon/errors.rb

Overview

Error raised when input exceeds size limits

This error is raised when input files or trees exceed configured size limits to prevent performance issues or hangs.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(limit_type, actual, limit) ⇒ SizeLimitExceededError

Initialize a new SizeLimitExceededError

Parameters:

  • limit_type (Symbol)

    The type of limit exceeded (:file_size, :node_count, :diff_lines)

  • actual (Integer)

    The actual size that exceeded the limit

  • limit (Integer)

    The configured limit



70
71
72
73
74
75
# File 'lib/canon/errors.rb', line 70

def initialize(limit_type, actual, limit)
  @limit_type = limit_type
  @actual = actual
  @limit = limit
  super(build_message)
end

Instance Attribute Details

#actualObject (readonly)

Returns the value of attribute actual.



62
63
64
# File 'lib/canon/errors.rb', line 62

def actual
  @actual
end

#limitObject (readonly)

Returns the value of attribute limit.



62
63
64
# File 'lib/canon/errors.rb', line 62

def limit
  @limit
end

#limit_typeObject (readonly)

Returns the value of attribute limit_type.



62
63
64
# File 'lib/canon/errors.rb', line 62

def limit_type
  @limit_type
end