error handling changes

This commit is contained in:
arzynik 2014-11-10 17:45:04 -08:00
parent 2dbb92b781
commit f4beee09b5
2 changed files with 3 additions and 4 deletions

View File

@ -22,7 +22,7 @@ class Resource extends \RESTful\Resource
{ {
// @debug: only defined on a cockpit refund // @debug: only defined on a cockpit refund
if (c::app()->balanced_debug) { if (c::app()->balanced_debug) {
echo '<pre>'; var_dump($response); echo '<pre>'; var_dump($response); exit;
} }
if (property_exists($response->body, 'errors')) if (property_exists($response->body, 'errors'))
$error = Error::createFromResponse($response); $error = Error::createFromResponse($response);

View File

@ -2119,8 +2119,6 @@ class Crunchbutton_Order extends Cana_Table {
// Refund the gift // Refund the gift
$this->refundGiftFromOrder(); $this->refundGiftFromOrder();
c::app()->balanced_debug = true;
if ( intval( $this->charged() ) > 0 ) { if ( intval( $this->charged() ) > 0 ) {
@ -2157,7 +2155,8 @@ class Crunchbutton_Order extends Cana_Table {
$res = $hold->void(); $res = $hold->void();
} catch (Exception $e) { } catch (Exception $e) {
print_r($e);
return false;
} }
if (!$res) { if (!$res) {
Log::debug([ Log::debug([