Files
ubicloud/lib/clover_error.rb
Jeremy Evans 37b6e5e316 Move DependencyError into its own file
Having it in clover_error.rb file breaks autoloading and reloading.
If you modified the clover_error.rb file while puma was running in
development mode, you would get the following error:

```
Puma caught this error: superclass mismatch for class DependencyError (TypeError)
/home/jeremy/code/ubicloud/clover_error.rb:14:in `<top (required)>'
```

This uses a separate file per class, and moves the files to the lib
folder.  This avoids cluttering the root folder, and makes the loader
simpler.
2024-12-31 11:25:47 -08:00

13 lines
242 B
Ruby

# frozen_string_literal: true
class CloverError < StandardError
attr_reader :code, :type, :details
def initialize(code, type, message, details = nil)
@code = code
@type = type
@details = details
super(message)
end
end