-
Notifications
You must be signed in to change notification settings - Fork 0
Errors Handling
This project follows the one error to rule them all principle: all errors inherit from Knowledge::Error.
That means you can rescue Knowledge::Error to catch all lib's errors.
As Knowledge::Error inherits from StandardError, if you rescue StandardError, you'll catch all gem errors too.
Thrown when we cannot find the adapter on which executing an operation.
i.e: if you try to enable an adapter via the enable_adapter method before registering it, the gem will throw an AdapterNotFound error.
Thrown when an adapter inheriting from Knowledge::Adapters::Base does not override the run method.
Thrown when the learning process leads to an error.
It can occur when manipulating adapters, setter or during the gather! method execution.
Thrown when we failed registering an adapter.