From 963adbcc746dbc20f6d696257ac35bc8d1503a09 Mon Sep 17 00:00:00 2001 From: William Panting Date: Thu, 17 Oct 2013 14:19:02 -0300 Subject: [PATCH 1/3] stack on ingest --- includes/ingest.form.inc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/includes/ingest.form.inc b/includes/ingest.form.inc index 95944eb1..c2651e0e 100644 --- a/includes/ingest.form.inc +++ b/includes/ingest.form.inc @@ -771,8 +771,17 @@ function islandora_ingest_form_submit(array $form, array &$form_state) { catch (Exception $e) { // If post hooks throws it may already exist at this point but may be // invalid, so don't say failed. - watchdog('islandora', 'Exception Message: @exception.', array('@exception' => $e->getMessage()), WATCHDOG_ERROR); - drupal_set_message(t('A problem occured while ingesting "@label" (ID: @pid), please notifiy the administrator.', array('@label' => $object->label, '@pid' => $object->id)), 'error'); + watchdog( + 'islandora', + 'Exception Message: @exception. Trace: @trace', + array('@exception' => $e->getMessage(), '@trace' => $e->getTraceAsString()), + WATCHDOG_ERROR + ); + drupal_set_message( + t('A problem occured while ingesting "@label" (ID: @pid), please notifiy the administrator.', + array('@label' => $object->label, '@pid' => $object->id)), + 'error' + ); } } // XXX: Foreaching with references can be weird... The reference exists in From 3ea5d882c465e37aadbe0f911fc4f6f300ea1aca Mon Sep 17 00:00:00 2001 From: William Panting Date: Thu, 17 Oct 2013 14:25:25 -0300 Subject: [PATCH 2/3] cleaner watchdog --- includes/ingest.form.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/ingest.form.inc b/includes/ingest.form.inc index c2651e0e..dbeb8281 100644 --- a/includes/ingest.form.inc +++ b/includes/ingest.form.inc @@ -773,7 +773,7 @@ function islandora_ingest_form_submit(array $form, array &$form_state) { // invalid, so don't say failed. watchdog( 'islandora', - 'Exception Message: @exception. Trace: @trace', + 'Exception during ingest with Message: "@exception", and Trace: @trace', array('@exception' => $e->getMessage(), '@trace' => $e->getTraceAsString()), WATCHDOG_ERROR ); From 13f73878b6dd4febce7a2b22e9d25494bf280f91 Mon Sep 17 00:00:00 2001 From: William Panting Date: Thu, 17 Oct 2013 14:39:21 -0300 Subject: [PATCH 3/3] ingest form watchdog --- includes/ingest.form.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/ingest.form.inc b/includes/ingest.form.inc index dbeb8281..0ed75385 100644 --- a/includes/ingest.form.inc +++ b/includes/ingest.form.inc @@ -57,6 +57,12 @@ function islandora_ingest_form(array $form, array &$form_state, array $configura return islandora_ingest_form_execute_step($form, $form_state); } catch (Exception $e) { + watchdog( + 'islandora', + 'Exception during ingest form processing with Message: "@exception", and Trace: @trace', + array('@exception' => $e->getMessage(), '@trace' => $e->getTraceAsString()), + WATCHDOG_ERROR + ); drupal_set_message($e->getMessage(), 'error'); return array(array( '#markup' => l(t('Back'), 'javascript:window.history.back();', array('external' => TRUE))));