Exception: Upl::Runtime::PrologException

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/upl/runtime.rb

Instance Method Summary collapse

Constructor Details

#initialize(term_tree) ⇒ PrologException



23
24
25
# File 'lib/upl/runtime.rb', line 23

def initialize(term_tree)
  @term_tree = term_tree
end

Instance Method Details

#messageObject



27
28
29
30
31
32
33
34
# File 'lib/upl/runtime.rb', line 27

def message
  @message ||= begin
    # TODO need to use print_message_lines/3 to generate this string
    pp = PP.new
    @term_tree.args.each{|arg| arg.pretty_print pp}
    "#{@term_tree.atom}: #{pp.output}"
  end
end