in reply to dbi raiseError = 1

you want PrintError, with or without RaiseError depending on whether you want the program to die.