Sha256: f1548e0b7a845572edccdfec85a76b6603f84c51f1bf5db1d872e5deb2ad4693

Contents?: true

Size: 564 Bytes

Versions: 25

Compression:

Stored size: 564 Bytes

Contents

Foobara.require_project_file("common", "error")

module Foobara
  # NOTE: annoyingly this will clash with ::RuntimeError if not fully qualified when using
  class RuntimeError < Error
    abstract

    class << self
      def category
        :runtime
      end

      def fatal?
        true
      end
    end

    # TODO: why path instead of runtime path?
    def initialize(message: nil, symbol: nil, context: nil, path: nil)
      args = { message:, symbol:, context:, path: }.compact
      super(**args.merge(category: self.class.category))
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
foobara-0.0.5 projects/common/src/runtime_error.rb
foobara-0.0.4 projects/common/src/runtime_error.rb
foobara-0.0.3 projects/common/src/runtime_error.rb
foobara-0.0.2 projects/common/src/runtime_error.rb
foobara-0.0.1 projects/common/src/runtime_error.rb