lib/csrmatrix/exceptions.rb in csrmatrix-1.0.0 vs lib/csrmatrix/exceptions.rb in csrmatrix-1.0.1

- old
+ new

@@ -1,11 +1,24 @@ module CsrMatrix module Exceptions - class NullMatrixException < StandardError; end + # Occurs when user enters a null matrix for processing. + class NullMatrixException < StandardError; end + + # Occurs when a sparse matrix operation occurs wherein its dimensions result in the operation being unavailable. class MatrixDimException < StandardError; end - class ArithmeticException < StandardError; end - class MatrixTypeException < StandardError; end + + # Occurs when the matrix builder expects a specific type; and is provided the wrong type to generate the sparse matrix. + class MatrixTypeException < StandardError; end + + # Occurs when the system divides by 0; standard arithmetic error. class DivideByZeroException < StandardError; end + + # Occurs when index queried is out of range of the matrix. class IndexOutOfRangeException < StandardError; end + + # Occurs when the sparse matrix is used in processing against a null / nil value. class ArgumentNullException < StandardError; end - end -end + + # + class InvariantError < StandardError; end + end # exceptions +end # csrmatrix \ No newline at end of file