Sha256: dae079b51177dd840b3dea37eea2ad2988253595149e508defd5fd315c240b95

Contents?: true

Size: 488 Bytes

Versions: 18

Compression:

Stored size: 488 Bytes

Contents

module PantographCore
  class Interface
    class PantographException < StandardError
      def prefix
        '[PANTOGRAPH_EXCEPTION]'
      end

      def caused_by_calling_ui_method?(method_name: nil)
        return false if backtrace.nil? || backtrace[0].nil? || method_name.nil?
        first_frame = backtrace[0]
        if first_frame.include?(method_name) && first_frame.include?('interface.rb')
          true
        else
          false
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
pantograph-0.1.22 pantograph_core/lib/pantograph_core/ui/errors/pantograph_exception.rb
pantograph-0.1.21 pantograph_core/lib/pantograph_core/ui/errors/pantograph_exception.rb
pantograph-0.1.20 pantograph_core/lib/pantograph_core/ui/errors/pantograph_exception.rb
pantograph-0.1.19 pantograph_core/lib/pantograph_core/ui/errors/pantograph_exception.rb
pantograph-0.1.17 pantograph_core/lib/pantograph_core/ui/errors/pantograph_exception.rb
pantograph-0.1.16 pantograph_core/lib/pantograph_core/ui/errors/pantograph_exception.rb
pantograph-0.1.15 pantograph_core/lib/pantograph_core/ui/errors/pantograph_exception.rb
pantograph-0.1.14 pantograph_core/lib/pantograph_core/ui/errors/pantograph_exception.rb
pantograph-0.1.13 pantograph_core/lib/pantograph_core/ui/errors/pantograph_exception.rb
pantograph-0.1.12 pantograph_core/lib/pantograph_core/ui/errors/pantograph_exception.rb
pantograph-0.1.10 pantograph_core/lib/pantograph_core/ui/errors/pantograph_exception.rb
pantograph-0.1.8 pantograph_core/lib/pantograph_core/ui/errors/pantograph_exception.rb
pantograph-0.1.7 pantograph_core/lib/pantograph_core/ui/errors/pantograph_exception.rb
pantograph-0.1.6 pantograph_core/lib/pantograph_core/ui/errors/pantograph_exception.rb
pantograph-0.1.4 pantograph_core/lib/pantograph_core/ui/errors/pantograph_exception.rb
pantograph-0.1.3 pantograph_core/lib/pantograph_core/ui/errors/pantograph_exception.rb
pantograph-0.1.1 pantograph_core/lib/pantograph_core/ui/errors/pantograph_exception.rb
pantograph-0.1.0 pantograph_core/lib/pantograph_core/ui/errors/pantograph_exception.rb