Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 1608

Přidáno uživatelem David Raška před více než 12 roky(ů)

Opravy:
- oprava logovani vyjimek databazovych transakci

Zobrazit rozdíly:

freenetis/branches/testing/application/i18n/cs_CZ/texts.php
'error - amount has to be positive' => 'Chyba - částka musí být kladná.',
'error - cannot add bank transfer' => 'Chyba - nelze přidat bankovní převod.',
'error - cannot add cloud' => 'Chyba - nelze přidat oblast',
'error - cannot add interface' => 'Chyba - nelze přidat rozhraní',
'error - cannot add message' => 'Chyba - nelze přidat zprávu.',
'error - cannot add new filter query' => 'Chyba - nelze přidat nový dotaz filtru.',
'error - cannot add new group' => 'Chyba - nelze přidat novou skupinu',
freenetis/branches/testing/application/i18n/cs_CZ/core.php
'unknown error' => 'Neznámá chyba',
'uncaught_exception' => 'Nezachycená %s: %s v souboru %s na řádce %s',
'scheduler_exception' => 'Chyba plánovače %s: %s v akci %s na řádku %s',
'transaction_exception' => "Chyba transakce: %s v souboru %s na řádku %s - \nZásobník %s",
);
freenetis/branches/testing/application/models/message.php
catch (Exception $e)
{
$eq_model->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
throw $e;
}
......
catch (Exception $e)
{
$sms->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
throw $e;
}
freenetis/branches/testing/application/models/members_traffic.php
catch (Exception $e)
{
$this->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
return false;
}
}
freenetis/branches/testing/application/controllers/clouds.php
{
// roolback transaction
$cloud_model->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
// message
status::error('Error - cannot add cloud');
}
......
{
// roolback transaction
$cloud_model->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
// message
status::error('Error - cannot add admin to cloud');
}
......
{
// roolback transaction
$cloud_model->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
// message
status::error('Error - cannot add subnet to cloud');
}
freenetis/branches/testing/application/controllers/ifaces.php
catch (Exception $e)
{
$iface->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - Cannot add interface.');
}
}
else
{
$headline = __('Add new interface') . ' (' . Iface_Model::get_type($type) . ')';
$view = new View('main');
$view->breadcrumbs = $breadcrumbs;
$view->title = $headline;
$view->content = new View('form');
$view->content->form = $form->html();
$view->content->headline = $headline;
$view->render(TRUE);
}
$headline = __('Add new interface') . ' (' . Iface_Model::get_type($type) . ')';
$view = new View('main');
$view->breadcrumbs = $breadcrumbs;
$view->title = $headline;
$view->content = new View('form');
$view->content->form = $form->html();
$view->content->headline = $headline;
$view->render(TRUE);
}
else // redirect after setting of device and type
{
......
catch (Exception $e)
{
$iface->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - Cannot edit interface');
}
}
freenetis/branches/testing/application/controllers/variable_symbols.php
catch (Exception $e)
{
$variable_symbol_model->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - cant update variable symbols');
}
freenetis/branches/testing/application/controllers/private_phone_contacts.php
catch (Exception $ex)
{
$user->transaction_rollback();
Log::add('error', $ex->getMessage());
Log::add_exception($ex);
echo json_encode($error['error_save']);
}
}
freenetis/branches/testing/application/controllers/transfers.php
catch (Exception $e)
{
$db->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - cannot add new transfer.');
}
url::redirect('transfers/show_by_account/' . $origin_account_id);
......
catch (Exception $e)
{
$db->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::success('Transfer hasnot been successfully added');
}
url::redirect('transfers/show_all');
......
catch (Exception $e)
{
$db->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::success('Transfer has not been successfully added');
}
url::redirect('transfers/show_by_account/' . $origin_account);
......
catch (Exception $e)
{
$transfer->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - cant update transfer.');
url::redirect('transfers/show/' . $transfer_id);
}
......
catch (Exception $e)
{
$db->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - some fees have not been deducted.');
}
url::redirect('transfers/show_all');
......
catch (Exception $e)
{
$db->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - some fees have not been recounted.');
}
url::redirect('transfers/show_by_account/' . $account_id);
......
catch (Exception $e)
{
$db->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - cant deduct entrance fee.');
}
url::redirect('transfers/show_all');
......
catch (Exception $e)
{
$db->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - cant deduct entrance fee.');
}
url::redirect('transfers/show_by_account/' . $account_id);
......
catch (Exception $e)
{
$db->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - cant deduct device fee.');
}
url::redirect('transfers/show_all');
......
catch (Exception $e)
{
$account->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - cant recalculate device repayments.');
}
url::redirect('transfers/show_by_account/' . $account_id);
......
catch (Exception $e)
{
$db->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - cant add new transfer.');
}
$this->redirect(Path::instance()->previous());
freenetis/branches/testing/application/controllers/filter_queries.php
catch (Exception $e)
{
$filter_query->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - cannot add new filter query.');
$this->redirect($url);
......
catch (Exception $e)
{
$filter_query->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
if ($is_default)
status::error('Error - Cannot unset filter query as default.');
else
freenetis/branches/testing/application/controllers/subnets.php
{
// roolback
$subnet_model->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
// correct add
status::error('Error - cannot save subnet.');
$this->redirect('show_all');
freenetis/branches/testing/application/controllers/device_admins.php
catch (Exception $e)
{
$device_admin_model->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - cannot update device admin.');
}
......
catch (Exception $e)
{
$device_admin_model->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - cannot update device admin.');
}
url::redirect(url_lang::base().'users/show/'.$user->id);
freenetis/branches/testing/application/controllers/bank_transfers.php
catch (Exception $e)
{
$db->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - cannot assign transfer.');
}
url::redirect('bank_transfers/unidentified_transfers');
......
catch (Exception $e)
{
$db->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - cannot add bank transfer.');
}
url::redirect('bank_transfers/show_by_bank_account/'.$baa_id);
......
catch (Exception $e)
{
$db->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - cannot add bank transfer.');
}
freenetis/branches/testing/application/controllers/ip_addresses.php
catch (Exception $e)
{
$ip_address->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - Cannot update ip address.');
}
freenetis/branches/testing/application/controllers/phone_invoices.php
catch (Exception $e)
{
$phone_invoice->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
$form->parse->add_error('requied', nl2br($e->getMessage()));
}
}
freenetis/branches/testing/application/controllers/registration.php
{
status::error('Cannot complete registration.');
$user->transaction_rollback();
Log::add('error', $ex->getMessage());
Log::add_exception($ex);
}
}
freenetis/branches/testing/application/controllers/device_templates.php
catch (Exception $e)
{
$device_templates->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
$bad++;
}
}
freenetis/branches/testing/application/controllers/aro_groups.php
catch (Exception $e)
{
$aro_group->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - cannot add new group.');
}
url::redirect('aro_groups/show_all');
......
catch (Exception $e)
{
$aro_group->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - cannot update access control group.');
}
url::redirect (url_lang::base().'aro_groups/show/'.$aro_group->id);
......
catch (Exception $e)
{
$group->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - cannot delete group.');
}
url::redirect('aro_groups/show_all');
freenetis/branches/testing/application/controllers/bank_statements.php
catch (Exception $e)
{
$db->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - cannot delete bank statement.');
}
url::redirect('bank_statements/show_by_bank_account/' . $statement->bank_account_id);
freenetis/branches/testing/application/controllers/members.php
{
// rollback transaction
$member->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - cant add new member.');
$this->redirect('members/show_all');
}
freenetis/branches/testing/application/controllers/vlans.php
catch (Exception $e)
{
$vlan->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - Cannot add new VLAN.');
$this->redirect('show_all');
freenetis/branches/testing/application/controllers/allowed_subnets_counts.php
catch (Exception $e)
{
$member->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - Cannot update count of allowed subnets');
}
freenetis/branches/testing/application/controllers/work_reports.php
catch (Exception $e)
{
$work_report->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - cant add new work report.');
}
}
......
catch (Exception $e)
{
$work_report->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - cant edit work report.');
}
}
freenetis/branches/testing/application/controllers/sms.php
catch (Exception $e)
{
$sms->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Error - cant add new SMS message.');
}
}
freenetis/branches/testing/application/controllers/phone_operators.php
{
// roolback transaction
$phone_operator_model->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
// message
status::error('Error - cannot add phone operator');
}
......
{
// roolback transaction
$phone_operator_model->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
// message
status::error('Error - cant edit phone operator');
}
freenetis/branches/testing/application/controllers/import.php
catch (Exception $e)
{
$db->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error(
__('Import has failed') . '.<br>' . $e->getMessage(),
FALSE
......
catch (Exception $e)
{
$db->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error(
__('Import has failed') . '.<br>' . $e->getMessage(),
FALSE
freenetis/branches/testing/application/controllers/devices.php
catch (Exception $e)
{
$dm->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Device has not been successfully saved.');
}
}
......
catch (Exception $e)
{
$dm->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
}
}
else
......
catch (Exception $e)
{
$device->transaction_rollback();
Log::add('error', $e->getMessage());
Log::add_exception($e);
status::error('Device has not been updated.');
}
} // end of validation
freenetis/branches/testing/system/i18n/en_US/core.php
'no_default_route' => 'Please set a default route in <tt>config/routes.php</tt>.',
'no_controller' => 'Kohana was not able to determine a controller to process this request: %s',
'page_not_found' => 'The page you requested, <tt>%s</tt>, could not be found.',
'transaction_exception' => "Transaction error: %s in file %s on line %s - \nStack %s",
// not everybody needs to know our version of kohana
//'stats_footer' => 'Loaded in {execution_time} seconds, using {memory_usage} of memory. Generated by Kohana v{kohana_version}.',
freenetis/branches/testing/system/core/Log.php
url::current(TRUE),
);
}
/**
* Add a log exception message
*
* @param Exception $e
*/
public static function add_exception(Exception $e)
{
self::add('error', Kohana::lang(
'core.transaction_exception',
$e->getMessage(), $e->getFile(),
$e->getLine(), $e->getTraceAsString()
));
}
/**
* Write the current log to a file.

Také k dispozici: Unified diff