Deploying and Managing Apama Applications > Using the Apama Database Connector > The ADBCHelper Application Programming Interface > Handling errors
Handling errors
The DBUtil actions require a user-defined handleError action that takes a single string parameter. The handleError action handles errors that could occur during execution of a DBUtil event action call.
The following EPL code snippet shows a simple error handler.

//...
com.apama.database.DBUtil db;
//...
action onload {
db.openQuickODBC("exampledb","thomas","thomas123", handleError);
//...
}

action handleError( string reason ) {
log "DB Error: " + reason;
}
Copyright © 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.