log("Reporting error",typeNameFormat,record_type,error_message);
ScriptableFunction on_error_function = _registry.getErrorFunction(record_type);
if (on_error_function != null) {
try {
Object [] args = new Object[] { error_message };
on_error_function.invoke(null, args);
} catch(Exception e) {
log("Could not dispatch error message",typeNameFormat, record_type, error_message,e);
}
} else {
log("No error handler registered",typeNameFormat,record_type,error_message);