Sha256: a954f248c82c177afd7ec94e10a961698928dda69c07d19f4ecb37186a069ffd

Contents?: true

Size: 358 Bytes

Versions: 29

Compression:

Stored size: 358 Bytes

Contents

module UniverseCompiler
  module Utils

    module ErrorPropagation

      private

      def false_or_raise(message = 'Error message not provided!', raise_error: false)
        if raise_error
          raise UniverseCompiler::Error, message
        else
          UniverseCompiler.logger.warn message
        end
        false
      end

    end

  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
universe_compiler-0.5.6 lib/universe_compiler/utils/error_propagation.rb
universe_compiler-0.5.5 lib/universe_compiler/utils/error_propagation.rb
universe_compiler-0.5.4 lib/universe_compiler/utils/error_propagation.rb
universe_compiler-0.5.3 lib/universe_compiler/utils/error_propagation.rb
universe_compiler-0.5.2 lib/universe_compiler/utils/error_propagation.rb
universe_compiler-0.5.1 lib/universe_compiler/utils/error_propagation.rb
universe_compiler-0.4.3 lib/universe_compiler/utils/error_propagation.rb
universe_compiler-0.4.2 lib/universe_compiler/utils/error_propagation.rb
universe_compiler-0.4.1 lib/universe_compiler/utils/error_propagation.rb
universe_compiler-0.4.0 lib/universe_compiler/utils/error_propagation.rb
universe_compiler-0.3.12 lib/universe_compiler/utils/error_propagation.rb
universe_compiler-0.3.11 lib/universe_compiler/utils/error_propagation.rb
universe_compiler-0.3.10 lib/universe_compiler/utils/error_propagation.rb
universe_compiler-0.3.9 lib/universe_compiler/utils/error_propagation.rb
universe_compiler-0.3.8 lib/universe_compiler/utils/error_propagation.rb
universe_compiler-0.3.7 lib/universe_compiler/utils/error_propagation.rb
universe_compiler-0.3.6 lib/universe_compiler/utils/error_propagation.rb
universe_compiler-0.3.5 lib/universe_compiler/utils/error_propagation.rb
universe_compiler-0.3.4 lib/universe_compiler/utils/error_propagation.rb
universe_compiler-0.3.3 lib/universe_compiler/utils/error_propagation.rb