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.
8 lines
146 B
Ruby
8 lines
146 B
Ruby
# frozen_string_literal: true
|
|
|
|
class DependencyError < CloverError
|
|
def initialize(message)
|
|
super(409, "DependencyError", message)
|
|
end
|
|
end
|