File: errors.rb

package info (click to toggle)
ruby-cvss-suite 4.1.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,612 kB
  • sloc: ruby: 2,829; makefile: 4; sh: 3
file content (25 lines) | stat: -rw-r--r-- 593 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# CVSS-Suite, a Ruby gem to manage the CVSS vector
#
# This work is licensed under the terms of the MIT license.
# See the LICENSE.md file in the top-level directory.

module CvssSuite
  ##
  # This will define classed errors to be expected
  module Errors
    ##
    # The base error class to be inherited by more specific classes
    class CvssError < StandardError
      attr_accessor :message

      def initialize(message)
        @message = message
        super
      end
    end

    class InvalidVector < RuntimeError; end

    class InvalidParentClass < ArgumentError; end
  end
end