Exception: Xeno::BudgetExceeded
- Defined in:
- lib/xeno/errors.rb
Overview
A session token budget is spent: raised BEFORE the model call that would overspend. Deterministic turn failure; reset recovers the session.
Instance Attribute Summary collapse
-
#axis ⇒ Object
readonly
Returns the value of attribute axis.
-
#limit ⇒ Object
readonly
Returns the value of attribute limit.
-
#used ⇒ Object
readonly
Returns the value of attribute used.
Instance Method Summary collapse
-
#initialize(axis:, used:, limit:) ⇒ BudgetExceeded
constructor
A new instance of BudgetExceeded.
Constructor Details
#initialize(axis:, used:, limit:) ⇒ BudgetExceeded
Returns a new instance of BudgetExceeded.
27 28 29 30 31 32 |
# File 'lib/xeno/errors.rb', line 27 def initialize(axis:, used:, limit:) @axis = axis @used = used @limit = limit super("session #{axis} token budget exceeded (#{used}/#{limit})") end |
Instance Attribute Details
#axis ⇒ Object (readonly)
Returns the value of attribute axis.
25 26 27 |
# File 'lib/xeno/errors.rb', line 25 def axis @axis end |
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
25 26 27 |
# File 'lib/xeno/errors.rb', line 25 def limit @limit end |
#used ⇒ Object (readonly)
Returns the value of attribute used.
25 26 27 |
# File 'lib/xeno/errors.rb', line 25 def used @used end |