Exception: TreeHaver::NotAvailable

Inherits:
Error
  • Object
show all
Defined in:
lib/tree_haver.rb

Overview

Raised when a requested backend or feature is not available These are serious errors that extends Exception (not StandardError). This can occur when:

  • Required native libraries are not installed

  • The selected backend is not compatible with the current Ruby implementation

  • A language grammar cannot be loaded

Examples:

Handling unavailable backends

begin
  language = TreeHaver::Language.from_library("/path/to/grammar.so")
rescue TreeHaver::NotAvailable => e
  puts "Grammar not available: #{e.message}"
end

See Also: