Exception

ALError.h

Method Description
ALError::toString() get ALError string

All NAOqi errors are based on exception. All user commands should be encapsulated in a try catch block.

// C++ sample try { // init to 0 getParentBroker()->getMemoryProxy()->insertData("variableName",0) } catch(ALError&e) { std::cout << "error: " << e.toString() << std::endl; }

# python sample try: #init to 0 ALMemory.insertData("variableName",0) except RuntimeError,e: print "failed to init variable" print e





Copyright © 2010 Aldebaran-Robotics - All rights reserved