← Back to team overview

zorba-coders team mailing list archive

[Bug 867112] Re: Diagnostic Handler not working in API Bindings

 

** Changed in: zorba
       Status: In Progress => Fix Committed

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/867112

Title:
  Diagnostic Handler not working in API Bindings

Status in Zorba - The XQuery Processor:
  Fix Committed

Bug description:
  When I run this code in python the diagnostic handler method is never
  called.

  class MyDiagnosticHandler(zorba_api.DiagnosticHandler): 
    def error(self, *args):
      print "Error args: ", args

  def test(zorba, diagnosticHandler):
    try:
      xquery = zorba.compileQuery("1 div 0", diagnosticHandler)
      print xquery.execute()
    except Exception, e:
      print "Cought error: ", e
    return

  
  store = zorba_api.InMemoryStore_getInstance()
  zorba = zorba_api.Zorba_getInstance(store)
  diagnosticHandler = MyDiagnosticHandler()

  print "Running: Compile query string using Diagnostic Handler"
  test(zorba, diagnosticHandler)
  print "Success"

  
  zorba.shutdown()
  zorba_api.InMemoryStore_shutdown(store)

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/867112/+subscriptions