diff --git a/dvg_appointments.module b/dvg_appointments.module index 24d6112..5558c49 100644 --- a/dvg_appointments.module +++ b/dvg_appointments.module @@ -15,6 +15,7 @@ define('DVG_APPOINTMENTS_ERRORCODE_UNKNOWN', 1); define('DVG_APPOINTMENTS_ERRORCODE_DATE_TIME', 2); +define('DVG_APPOINTMENTS_ERRORCODE_MESSAGE', 3); /** * Implements hook_menu(). @@ -1669,6 +1670,10 @@ function dvg_appointments_book_appointment(&$form, &$form_state) { $form_state['rebuild'] = TRUE; break; + case DVG_APPOINTMENTS_ERRORCODE_MESSAGE: + form_set_error('appointments', $e->getMessage()); + break; + default: form_set_error('appointments', t('An unknown error occurred while booking your appointment. Please try again later.')); }