HOR-1471

HOR-1471
This commit is contained in:
Paula V. Quispe
2016-07-27 16:37:21 -04:00
parent 4e14ccc976
commit c3fb995759
79 changed files with 399 additions and 170 deletions

View File

@@ -845,7 +845,10 @@ class Bootstrap
$skinEngine = new SkinEngine('publish', 'blank', ''); $skinEngine = new SkinEngine('publish', 'blank', '');
$skinEngine->dispatch(); $skinEngine->dispatch();
} else { } else {
die($e->getMessage()); $token = strtotime("now");
PMException::registerErrorLog($e, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }
} }
} }

View File

@@ -266,7 +266,10 @@ class DataBaseMaintenance
// Commented that is not assigned to a variable. // Commented that is not assigned to a variable.
// mysql_escape_string("';"); // mysql_escape_string("';");
if (! @mysql_query( $sql )) { if (! @mysql_query( $sql )) {
echo mysql_error() . "\n"; $ws = (defined("SYS_SYS"))? SYS_SYS : "Wokspace Undefined";
Bootstrap::registerMonolog('MysqlCron', 400, mysql_error(), array('sql'=>$sql), $ws, 'mysql.log');
$varRes = mysql_error() . "\n";
G::outRes( $varRes );
return false; return false;
} }
return true; return true;
@@ -284,7 +287,10 @@ class DataBaseMaintenance
$tableName = str_replace( '.dump', '', basename( $backupFile ) ); $tableName = str_replace( '.dump', '', basename( $backupFile ) );
$sql = "LOAD DATA INFILE '$backupFile' INTO TABLE $tableName FIELDS TERMINATED BY '\t|\t' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\t\t\r\r\n'"; $sql = "LOAD DATA INFILE '$backupFile' INTO TABLE $tableName FIELDS TERMINATED BY '\t|\t' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\t\t\r\r\n'";
if (! @mysql_query( $sql )) { if (! @mysql_query( $sql )) {
print mysql_error() . "\n"; $ws = (defined("SYS_SYS"))? SYS_SYS : "Wokspace Undefined";
Bootstrap::registerMonolog('MysqlCron', 400, mysql_error(), array('sql'=>$sql), $ws, 'mysql.log');
$varRes = mysql_error() . "\n";
G::outRes( $varRes );
return false; return false;
} }
return true; return true;

View File

@@ -5704,6 +5704,17 @@ class G
$clean = ($lowercase) ? (function_exists('mb_strtolower')) ? mb_strtolower($clean, 'UTF-8') : strtolower($clean) : $clean; $clean = ($lowercase) ? (function_exists('mb_strtolower')) ? mb_strtolower($clean, 'UTF-8') : strtolower($clean) : $clean;
return $clean; return $clean;
} }
/**
* Out the result
*
* @param string $sVar
*
* @return showRes($string)
*/
public function outRes ($sInfVar)
{
echo $sInfVar;
}
/** /**
* encryptOld * encryptOld
* *

View File

@@ -12,7 +12,6 @@ class PMException extends Exception
public function __construct ($message, $code = 0, $previous = null) public function __construct ($message, $code = 0, $previous = null)
{ {
//parent::__construct($message, 1, $previous);
parent::__construct( $message, 1 ); parent::__construct( $message, 1 );
} }
@@ -20,5 +19,10 @@ class PMException extends Exception
{ {
return __CLASS__ . ": [{$this->code}]: {$this->message}\n"; return __CLASS__ . ": [{$this->code}]: {$this->message}\n";
} }
public function registerErrorLog($error, $token){
$ws = (defined("SYS_SYS"))? SYS_SYS : "Wokspace Undefined";
Bootstrap::registerMonolog('ExceptionCron', 400, $error->getMessage(), array('token'=>$token), $ws, 'exception.log');
}
} }

View File

@@ -873,7 +873,7 @@ class Phing {
// that isn't very compatible w/ other frontends (but // that isn't very compatible w/ other frontends (but
// there aren't any right now, so I'm not stressing) // there aren't any right now, so I'm not stressing)
print("Error importing $path\n"); print("Error importing $path\n");
print($e->getTraceAsString()."\n"); error_log( $e->getTraceAsString()."\n" );
} }
throw $e; throw $e;
} }

View File

@@ -135,7 +135,7 @@ class TaskHandler extends AbstractHandler {
} catch (BuildException $be) { } catch (BuildException $be) {
// swallow here, will be thrown again in // swallow here, will be thrown again in
// UnknownElement->maybeConfigure if the problem persists. // UnknownElement->maybeConfigure if the problem persists.
print("Swallowing exception: ".$be->getMessage() . "\n"); error_log( "Swallowing exception: ".$be->getMessage() . "\n" );
} }
// the task is not known of bat, try to load it on thy fly // the task is not known of bat, try to load it on thy fly

View File

@@ -255,8 +255,8 @@ class Column extends XMLElement {
try { try {
$this->phpName = NameFactory::generateName(NameFactory::PHP_GENERATOR, $inputs); $this->phpName = NameFactory::generateName(NameFactory::PHP_GENERATOR, $inputs);
} catch (EngineException $e) { } catch (EngineException $e) {
print $e->getMessage() . "\n"; error_log( $e->getMessage() . "\n" );
print $e->getTraceAsString(); error_log( $e->getTraceAsString() );
} }
} }
return $this->phpName; return $this->phpName;

View File

@@ -88,8 +88,8 @@ class NameFactory {
} }
$algorithm = new $name(); $algorithm = new $name();
} catch (BuildException $e) { } catch (BuildException $e) {
print $e->getMessage() . "\n"; error_log( $e->getMessage() . "\n" );
print $e->getTraceAsString(); error_log( $e->getTraceAsString() );
} }
$this->algorithms[$name] = $algorithm; $this->algorithms[$name] = $algorithm;
} }

View File

@@ -198,8 +198,8 @@ class Table extends XMLElement implements IDMethod {
$this->addIndex(new Index($this, array_slice($pk, $i, $size))); $this->addIndex(new Index($this, array_slice($pk, $i, $size)));
} }
} catch (EngineException $e) { } catch (EngineException $e) {
print $e->getMessage() . "\n"; error_log( $e->getMessage() . "\n" );
print $e->getTraceAsString(); error_log( $e->getTraceAsString() );
} }
} }
@@ -243,8 +243,8 @@ class Table extends XMLElement implements IDMethod {
// as test cases), so we'll assume that we needn't add an // as test cases), so we'll assume that we needn't add an
// entry to the system name list for these. // entry to the system name list for these.
} catch (EngineException $nameAlreadyInUse) { } catch (EngineException $nameAlreadyInUse) {
print $nameAlreadyInUse->getMessage() . "\n"; error_log( $nameAlreadyInUse->getMessage() . "\n" );
print $nameAlreadyInUse->getTraceAsString(); error_log( $nameAlreadyInUse->getTraceAsString() );
} }
} }
@@ -596,8 +596,8 @@ class Table extends XMLElement implements IDMethod {
try { try {
$this->phpName = NameFactory::generateName(NameFactory::PHP_GENERATOR, $inputs); $this->phpName = NameFactory::generateName(NameFactory::PHP_GENERATOR, $inputs);
} catch (EngineException $e) { } catch (EngineException $e) {
print $e->getMessage() . "\n"; error_log( $e->getMessage() . "\n" );
print $e->getTraceAsString(); error_log( $e->getTraceAsString() );
} }
} }
return $this->phpName; return $this->phpName;

View File

@@ -84,13 +84,13 @@ class XmlToData extends AbstractHandler {
try { try {
$this->parser->parse(); $this->parser->parse();
} catch (Exception $e) { } catch (Exception $e) {
print $e->getMessage() . "\n"; error_log( $e->getMessage() . "\n" );
$br->close(); $br->close();
} }
$br->close(); $br->close();
} catch (Exception $e) { } catch (Exception $e) {
print $e->getMessage() . "\n"; error_log( $e->getMessage() . "\n" );
print $e->getTraceAsString(); error_log( $e->getTraceAsString() );
} }
return $this->data; return $this->data;

View File

@@ -293,7 +293,9 @@ if (! defined ('SYS_SYS')) {
processWorkspace (); processWorkspace ();
} }
catch (Exception $e) { catch (Exception $e) {
echo $e->getMessage (); $token = strtotime("now");
PMException::registerErrorLog($e, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
eprintln ("Problem in workspace: " . $sObject . ' it was omitted.', 'red'); eprintln ("Problem in workspace: " . $sObject . ' it was omitted.', 'red');
} }
eprintln (); eprintln ();

View File

@@ -133,7 +133,9 @@ function change_hash($command, $opts)
$workspace->close(); $workspace->close();
CLI::logging(pakeColor::colorize("Changed...", "ERROR") . "\n"); CLI::logging(pakeColor::colorize("Changed...", "ERROR") . "\n");
} catch (Exception $e) { } catch (Exception $e) {
echo "> Error: ".CLI::error(G::getErrorMessage($e)) . "\n"; $token = strtotime("now");
PMException::registerErrorLog($e, $token);
G::outRes( "> Error: " . CLI::error(G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token))) . "\n" );
} }
} }
} }

View File

@@ -66,7 +66,9 @@ class actionsByEmailCoreClass extends PMPlugin
error_log('The parameter $data->USR_UID is empty, the routed task may be a self-service type, actions by email does not work with self-service task types.', 0); error_log('The parameter $data->USR_UID is empty, the routed task may be a self-service type, actions by email does not work with self-service task types.', 0);
} }
} catch(Exception $e) { } catch(Exception $e) {
echo $e->getMessage().' Please contact to your system administrator.'; $token = strtotime("now");
PMException::registerErrorLog($e, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die; die;
} }
G::LoadClass('pmFunctions'); G::LoadClass('pmFunctions');

View File

@@ -318,7 +318,10 @@ class AppEvent extends BaseAppEvent
return $c; return $c;
} catch (Exception $oError) { } catch (Exception $oError) {
$log[] = ' Error execute event : ' . $oError->getMessage(); $log[] = ' Error execute event : ' . $oError->getMessage();
die( $oError->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oError, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
return $oError->getMessage(); return $oError->getMessage();
} }
} }

View File

@@ -192,7 +192,9 @@ class Translation extends BaseTranslation
$res['rowsJS'] = count( $translationJS ); $res['rowsJS'] = count( $translationJS );
return $res; return $res;
} catch (Exception $e) { } catch (Exception $e) {
echo $e->getMessage(); $token = strtotime("now");
PMException::registerErrorLog($e, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
} }
} }
@@ -239,7 +241,9 @@ class Translation extends BaseTranslation
$res['rowsMafeJS'] = count( $translation ); $res['rowsMafeJS'] = count( $translation );
return $res; return $res;
} catch (Exception $e) { } catch (Exception $e) {
echo $e->getMessage(); $token = strtotime("now");
PMException::registerErrorLog($e, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
} }
} }
@@ -362,7 +366,9 @@ class Translation extends BaseTranslation
$res['rowsJS'] = count( $translationJS ); $res['rowsJS'] = count( $translationJS );
return $res; return $res;
} catch (Exception $e) { } catch (Exception $e) {
echo $e->getMessage(); $token = strtotime("now");
PMException::registerErrorLog($e, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
} }
} }

View File

@@ -1235,7 +1235,10 @@ class adminProxy extends HttpProxyController
break; break;
} }
} catch (Exception $oException) { } catch (Exception $oException) {
die($oException->getMessage()); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }
exit(); exit();
} }

View File

@@ -136,7 +136,10 @@ try {
$response = isset( $aAuth[$authUID] ) ? 'false' : 'true'; $response = isset( $aAuth[$authUID] ) ? 'false' : 'true';
echo '{success: ' . $response . '}'; echo '{success: ' . $response . '}';
} catch (Exception $ex) { } catch (Exception $ex) {
echo '{success: false, error: ' . $ex->getMessage() . '}'; $token = strtotime("now");
PMException::registerErrorLog($ex, $token);
$varRes = '{success: false, error: ' . G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) . '}';
G::outRes( $varRes );
} }
break; break;
case 'deleteAuthSource': case 'deleteAuthSource':
@@ -145,7 +148,10 @@ try {
$RBAC->removeAuthSource( $_POST['auth_uid'] ); $RBAC->removeAuthSource( $_POST['auth_uid'] );
echo '{success: true}'; echo '{success: true}';
} catch (Exception $ex) { } catch (Exception $ex) {
echo '{success: false, error: ' . $ex->getMessage() . '}'; $token = strtotime("now");
PMException::registerErrorLog($ex, $token);
$varRes = '{success: false, error: ' . G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) . '}';
G::outRes( $varRes );
} }
break; break;
case 'authSourcesNew': case 'authSourcesNew':

View File

@@ -13,7 +13,9 @@ try {
G::header("Location: cases_Scheduler_List?PRO_UID=" . $prossesUid); G::header("Location: cases_Scheduler_List?PRO_UID=" . $prossesUid);
} catch (Exception $e) { } catch (Exception $e) {
echo $e->getMessage(); $token = strtotime("now");
PMException::registerErrorLog($e, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
exit(0); exit(0);
} }

View File

@@ -53,6 +53,8 @@ try {
} }
} }
} catch (Exception $e) { } catch (Exception $e) {
echo $e->getMessage(); $token = strtotime("now");
PMException::registerErrorLog($e, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
} }

View File

@@ -91,7 +91,10 @@ try {
$G_PUBLISH->AddContent( 'dynaform', 'xmlform', $aDyn['PRO_UID'] . '/' . $aDyn['DYN_UID'], '', $Fields['APP_DATA'], '', '', 'view' ); $G_PUBLISH->AddContent( 'dynaform', 'xmlform', $aDyn['PRO_UID'] . '/' . $aDyn['DYN_UID'], '', $Fields['APP_DATA'], '', '', 'view' );
G::RenderPage( 'publish', 'blank' ); G::RenderPage( 'publish', 'blank' );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }
?> ?>

View File

@@ -117,6 +117,9 @@ try {
G::RenderPage( 'publish', 'blank' ); G::RenderPage( 'publish', 'blank' );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -143,7 +143,10 @@ try {
G::RenderPage( 'publish', 'blank' ); G::RenderPage( 'publish', 'blank' );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }
?> ?>
<div id="publisherContent[10]" style="display: none"></div> <div id="publisherContent[10]" style="display: none"></div>

View File

@@ -70,6 +70,9 @@ try {
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -136,6 +136,9 @@ try {
G::RenderPage( 'publishBlank', 'blank' ); G::RenderPage( 'publishBlank', 'blank' );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -82,6 +82,9 @@ try {
G::RenderPage( 'publishBlank', 'blank' ); G::RenderPage( 'publishBlank', 'blank' );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -95,6 +95,9 @@ try {
G::RenderPage( 'publishBlank', 'blank' ); G::RenderPage( 'publishBlank', 'blank' );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -69,6 +69,9 @@ try {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_ReassignShowInfo', '', $aMessage ); $G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_ReassignShowInfo', '', $aMessage );
G::RenderPage( 'publish' ); G::RenderPage( 'publish' );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -722,7 +722,9 @@ try {
break; break;
} }
} catch (Exception $e) { } catch (Exception $e) {
echo G::json_encode($e->getMessage()); $token = strtotime("now");
PMException::registerErrorLog($e, $token);
G::outRes( G::json_encode( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) ) );
} }
/** /**

View File

@@ -70,6 +70,8 @@ try {
$result['data'] = $rows; $result['data'] = $rows;
print G::json_encode( $result ); print G::json_encode( $result );
} catch (Exception $e) { } catch (Exception $e) {
print G::json_encode ($e->getMessage()); $token = strtotime("now");
PMException::registerErrorLog($e, $token);
G::outRes( G::json_encode( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) ) );
} }

View File

@@ -136,5 +136,8 @@ try {
die('OK'); die('OK');
} catch (Exception $e) { } catch (Exception $e) {
die($e->getMessage()); $token = strtotime("now");
PMException::registerErrorLog($e, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -134,7 +134,9 @@ try {
break; break;
} }
} catch (Exception $e) { } catch (Exception $e) {
print ($e->getMessage()) ; $token = strtotime("now");
PMException::registerErrorLog($e, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
} }
/* /*

View File

@@ -343,9 +343,16 @@ try {
} else { } else {
$result["addons"] = array(); $result["addons"] = array();
} }
echo G::json_encode($result); G::outRes( G::json_encode($result) );
} catch (Exception $e) { } catch (Exception $e) {
echo G::json_encode(array("success" => false, "errors" => $e->getMessage())); $token = strtotime("now");
PMException::registerErrorLog($e, $token);
G::outRes(
G::json_encode(array(
"success" => false,
"errors" => G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token))
))
);
} }

View File

@@ -186,5 +186,5 @@ if ($status == 0) {
$response["success"] = false; $response["success"] = false;
} }
echo G::json_encode($response); G::outRes( G::json_encode($response) );

View File

@@ -104,6 +104,9 @@ try {
break; break;
} }
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -63,6 +63,9 @@ try {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'inputdocs/inputdocs_Edit', '', $aFields, '../inputdocs/inputdocs_Save' ); $G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'inputdocs/inputdocs_Edit', '', $aFields, '../inputdocs/inputdocs_Save' );
G::RenderPage( 'publish', 'raw' ); G::RenderPage( 'publish', 'raw' );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -101,6 +101,9 @@ try {
break; break;
} }
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -18,6 +18,8 @@ try {
echo "Nothing to do"; echo "Nothing to do";
} }
} catch (Exception $e) { } catch (Exception $e) {
echo $e->getMessage(); $token = strtotime("now");
PMException::registerErrorLog($e, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
} }

View File

@@ -42,6 +42,9 @@ try {
break; break;
} }
} catch ( Exception $oException ) { } catch ( Exception $oException ) {
die ( $oException->getMessage () ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -115,6 +115,9 @@ try {
} }
G::RenderPage( 'publish', 'raw' ); G::RenderPage( 'publish', 'raw' );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -72,6 +72,9 @@ try {
} }
G::RenderPage( 'publish', 'raw' ); G::RenderPage( 'publish', 'raw' );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -80,6 +80,9 @@ try {
} }
G::RenderPage( 'publish', 'raw' ); G::RenderPage( 'publish', 'raw' );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -86,6 +86,9 @@ try {
} }
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -28,6 +28,10 @@ try {
print "<font face='Arial' size='2' >File uploaded.</font>"; print "<font face='Arial' size='2' >File uploaded.</font>";
} catch (Exception $e) { } catch (Exception $e) {
print "<font face='Arial' size='2' color='red' >Error: " . $e->getMessage() . "</font>"; $token = strtotime("now");
PMException::registerErrorLog($e, $token);
$varRes = "<font face='Arial' size='2' color='red' >Error: " . G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) . "</font>";
G::outRes( $varRes );
die;
} }

View File

@@ -118,7 +118,8 @@ if (isset( $_REQUEST['action'] )) {
G::auditLog("CreateCategory", "Category Name: ".$catName); G::auditLog("CreateCategory", "Category Name: ".$catName);
echo '{success: true}'; echo '{success: true}';
} catch (Exception $ex) { } catch (Exception $ex) {
echo '{success: false, error: ' . $ex->getMessage() . '}'; $varEcho = '{success: false, error: ' . $ex->getMessage() . '}';
G::outRes( $varEcho );
} }
break; break;
case 'checkEditCategoryName': case 'checkEditCategoryName':
@@ -149,7 +150,8 @@ if (isset( $_REQUEST['action'] )) {
g::auditLog("UpdateCategory", "Category Name: ".$catName." Category ID: (".$catUID.") "); g::auditLog("UpdateCategory", "Category Name: ".$catName." Category ID: (".$catUID.") ");
echo '{success: true}'; echo '{success: true}';
} catch (Exception $ex) { } catch (Exception $ex) {
echo '{success: false, error: ' . $ex->getMessage() . '}'; $varEcho = '{success: false, error: ' . $ex->getMessage() . '}';
G::outRes( $varEcho );
} }
break; break;
case 'canDeleteCategory': case 'canDeleteCategory':
@@ -169,7 +171,8 @@ if (isset( $_REQUEST['action'] )) {
$catName = $cat->loadByCategoryId( $catUID ); $catName = $cat->loadByCategoryId( $catUID );
$cat->delete(); $cat->delete();
G::auditLog("DeleteCategory", "Category Name: ".$catName." Category ID: (".$catUID.") "); G::auditLog("DeleteCategory", "Category Name: ".$catName." Category ID: (".$catUID.") ");
echo '{success: true}'; $varEcho = '{success: true}';
G::outRes( $varEcho );
} catch (Exception $ex) { } catch (Exception $ex) {
echo '{success: false, error: ' . $ex->getMessage() . '}'; echo '{success: false, error: ' . $ex->getMessage() . '}';
} }

View File

@@ -288,7 +288,10 @@ switch ($request) {
$confParams = array('lang' => $lang, 'status' => 'failed'); $confParams = array('lang' => $lang, 'status' => 'failed');
$appCacheViewEngine = $oServerConf->setProperty('APP_CACHE_VIEW_ENGINE', $confParams); $appCacheViewEngine = $oServerConf->setProperty('APP_CACHE_VIEW_ENGINE', $confParams);
echo '{success: false, msg:"' . $e->getMessage() . '"}'; $token = strtotime("now");
PMException::registerErrorLog($e, $token);
$varRes = '{success: false, msg:"' . G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) . '"}';
G::outRes( $varRes );
} }
break; break;
case 'recreate-root': case 'recreate-root':

View File

@@ -182,7 +182,9 @@ switch ($request) {
// print (FAILED . ',' . $smtp->error['error']) ; // print (FAILED . ',' . $smtp->error['error']) ;
} }
} catch (Exception $e) { } catch (Exception $e) {
print (FAILED . ',' . $e->getMessage()) ; $token = strtotime("now");
PMException::registerErrorLog($e, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
} }
} else { } else {
print (SUCCESSFUL . ', No authentication required!') ; print (SUCCESSFUL . ', No authentication required!') ;
@@ -214,7 +216,9 @@ switch ($request) {
print (FAILED . ',' . $resp->msg) ; print (FAILED . ',' . $resp->msg) ;
} }
} catch (Exception $e) { } catch (Exception $e) {
print (FAILED . ',' . $e->getMessage()) ; $token = strtotime("now");
PMException::registerErrorLog($e, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
} }
} else { } else {

View File

@@ -163,7 +163,9 @@ try {
$trn->removeTranslationEnvironment( $locale ); $trn->removeTranslationEnvironment( $locale );
echo G::LoadTranslation( 'ID_LANGUAGE_DELETED_SUCCESSFULLY' ); echo G::LoadTranslation( 'ID_LANGUAGE_DELETED_SUCCESSFULLY' );
} catch (Exception $e) { } catch (Exception $e) {
echo $e->getMessage(); $token = strtotime("now");
PMException::registerErrorLog($e, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
} }
} else { } else {
echo str_replace( '{0}', $aRow[0], G::LoadTranslation( 'ID_LANGUAGE_CANT_DELETE' ) ); echo str_replace( '{0}', $aRow[0], G::LoadTranslation( 'ID_LANGUAGE_CANT_DELETE' ) );
@@ -177,6 +179,8 @@ try {
break; break;
} }
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
} }

View File

@@ -45,6 +45,9 @@ try {
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -100,6 +100,9 @@ try { //ini_set('display_errors','1');
} }
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -192,12 +192,12 @@ function newSkin ($baseSkin = 'classic')
$response['success'] = true; $response['success'] = true;
$response['message'] = G::LoadTranslation( 'ID_SKIN_SUCCESS_CREATE' ); $response['message'] = G::LoadTranslation( 'ID_SKIN_SUCCESS_CREATE' );
G::auditLog("CreateSkin", "Skin Name: ".$skinName); G::auditLog("CreateSkin", "Skin Name: ".$skinName);
print_r( G::json_encode( $response ) ); G::outRes( G::json_encode( $response ) );
} catch (Exception $e) { } catch (Exception $e) {
$response['success'] = false; $response['success'] = false;
$response['message'] = $e->getMessage(); $response['message'] = $e->getMessage();
$response['error'] = $e->getMessage(); $response['error'] = $e->getMessage();
print_r( G::json_encode( $response ) ); G::outRes( G::json_encode( $response ) );
} }
} }
@@ -308,12 +308,12 @@ function importSkin ()
$response['success'] = true; $response['success'] = true;
$response['message'] = G::LoadTranslation( 'ID_SKIN_SUCCESSFUL_IMPORTED' ); $response['message'] = G::LoadTranslation( 'ID_SKIN_SUCCESSFUL_IMPORTED' );
G::auditLog("ImportSkin", "Skin Name: ".$skinName); G::auditLog("ImportSkin", "Skin Name: ".$skinName);
print_r( G::json_encode( $response ) ); G::outRes( G::json_encode( $response ) );
} catch (Exception $e) { } catch (Exception $e) {
$response['success'] = false; $response['success'] = false;
$response['message'] = $e->getMessage(); $response['message'] = $e->getMessage();
$response['error'] = $e->getMessage(); $response['error'] = $e->getMessage();
print_r( G::json_encode( $response ) ); G::outRes( G::json_encode( $response ) );
} }
} }

View File

@@ -43,6 +43,9 @@ try {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'steps/conditions_Edit', '', $aFields, '../steps/conditions_Save' ); $G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'steps/conditions_Edit', '', $aFields, '../steps/conditions_Save' );
G::RenderPage( 'publish-raw', 'raw' ); G::RenderPage( 'publish-raw', 'raw' );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -48,6 +48,9 @@ try {
$oProcessMap = new ProcessMap(); $oProcessMap = new ProcessMap();
$oProcessMap->getStepsCriteria( $value['TAS_UID'] ); $oProcessMap->getStepsCriteria( $value['TAS_UID'] );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -207,6 +207,9 @@ try {
break; break;
} }
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -44,6 +44,9 @@ try {
$oProcessMap = new ProcessMap(); $oProcessMap = new ProcessMap();
$oProcessMap->getStepsCriteria( $_POST['TASK'] ); $oProcessMap->getStepsCriteria( $_POST['TASK'] );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -43,5 +43,8 @@ try {
$oProcessMap = new ProcessMap(); $oProcessMap = new ProcessMap();
$oProcessMap->getStepsCriteria( $_POST['TASK'] ); $oProcessMap->getStepsCriteria( $_POST['TASK'] );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -42,6 +42,9 @@ try {
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'steps/steps_availableBB', $oProcessMap->getAvailableBBCriteria( $_GET['PROCESS'], $_GET['TASK'] ), $_GET ); $G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'steps/steps_availableBB', $oProcessMap->getAvailableBBCriteria( $_GET['PROCESS'], $_GET['TASK'] ), $_GET );
G::RenderPage( 'publish-raw', 'raw' ); G::RenderPage( 'publish-raw', 'raw' );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -46,6 +46,9 @@ try {
$oProcessMap = new ProcessMap(); $oProcessMap = new ProcessMap();
$oProcessMap->getStepsCriteria( $_POST['sTask'] ); $oProcessMap->getStepsCriteria( $_POST['sTask'] );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -70,6 +70,9 @@ try {
break; break;
} }
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -43,5 +43,8 @@ try {
$oProcessMap = new ProcessMap(); $oProcessMap = new ProcessMap();
$oProcessMap->getStepsCriteria( $_POST['TASK'] ); $oProcessMap->getStepsCriteria( $_POST['TASK'] );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -136,6 +136,9 @@ try {
break; break;
} }
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -459,6 +459,9 @@ try {
break; break;
} }
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -46,6 +46,9 @@ try {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/tracker_ConditionsEdit', '', $aFields, '../tracker/tracker_ConditionsSave' ); $G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/tracker_ConditionsEdit', '', $aFields, '../tracker/tracker_ConditionsSave' );
G::RenderPage( 'publish-raw', 'raw' ); G::RenderPage( 'publish-raw', 'raw' );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -53,6 +53,9 @@ try {
$resultProcess = $infoProcess->load($value['PRO_UID']); $resultProcess = $infoProcess->load($value['PRO_UID']);
G::auditLog('CaseTrackers','Save Condition Case Tracker Object ('.$value['CTO_UID'].', condition: '.$value['CTO_CONDITION'].') in Process "'.$resultProcess['PRO_TITLE'].'"'); G::auditLog('CaseTrackers','Save Condition Case Tracker Object ('.$value['CTO_UID'].', condition: '.$value['CTO_CONDITION'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -65,7 +65,10 @@ try {
G::RenderPage( 'publish', 'blank' ); G::RenderPage( 'publish', 'blank' );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }
?> ?>

View File

@@ -163,6 +163,9 @@ try {
G::RenderPage( 'publish' ); G::RenderPage( 'publish' );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -164,6 +164,9 @@ try {
G::SendTemporalMessage( 'ID_CHANGES_SAVED', 'info', 'labels' ); G::SendTemporalMessage( 'ID_CHANGES_SAVED', 'info', 'labels' );
G::header( 'location: myInfo' ); G::header( 'location: myInfo' );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -582,5 +582,8 @@ try {
break; break;
} }
} catch (Exception $oException) { } catch (Exception $oException) {
die($oException->getMessage()); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -65,6 +65,9 @@ try {
$oUser->update( $aFields ); $oUser->update( $aFields );
G::header( 'location: users_List' ); G::header( 'location: users_List' );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -82,6 +82,9 @@ try {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'users/users_ReassignShowInfo', '', $aMessage ); $G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'users/users_ReassignShowInfo', '', $aMessage );
G::RenderPage( 'publish' ); G::RenderPage( 'publish' );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -150,6 +150,9 @@ try {
G::RenderPage( 'publish', 'blank' ); G::RenderPage( 'publish', 'blank' );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -48,6 +48,9 @@ try {
$G_PUBLISH->AddContent( 'view', 'users/users_Tree' ); $G_PUBLISH->AddContent( 'view', 'users/users_Tree' );
G::RenderPage( 'publish', 'raw' ); G::RenderPage( 'publish', 'raw' );
} catch (exception $oException) { } catch (exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -112,6 +112,9 @@ try {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'users/users_New.xml', '', $aFields, 'users_Save' ); $G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'users/users_New.xml', '', $aFields, 'users_Save' );
G::RenderPage( 'publish', 'blank' ); G::RenderPage( 'publish', 'blank' );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -42,6 +42,9 @@ try {
} }
} }
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -106,6 +106,9 @@ try {
} }
G::RenderPage( 'publish', 'raw' ); G::RenderPage( 'publish', 'raw' );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -70,6 +70,9 @@ try {
} }
G::RenderPage( 'publish' ); G::RenderPage( 'publish' );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }

View File

@@ -131,7 +131,10 @@ try {
echo $javascript . $oTree->render(); echo $javascript . $oTree->render();
} }
catch (Exception $oException) { catch (Exception $oException) {
die($oException->getMessage()); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }
unset($_SESSION['PROCESS']); unset($_SESSION['PROCESS']);
?> ?>

View File

@@ -72,7 +72,10 @@ try {
echo $oTree->render(); echo $oTree->render();
} catch (Exception $e) { } catch (Exception $e) {
die($e->getMessage()); $token = strtotime("now");
PMException::registerErrorLog($e, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }
unset($_SESSION["PROCESS"]); unset($_SESSION["PROCESS"]);

View File

@@ -173,7 +173,10 @@ try {
print $content; print $content;
} catch ( Exception $oException ) { } catch ( Exception $oException ) {
die ( $oException->getMessage () ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }
unset ($_SESSION ['PROCESS']); unset ($_SESSION ['PROCESS']);

View File

@@ -183,6 +183,9 @@ try {
print $content; print $content;
} catch ( Exception $oException ) { } catch ( Exception $oException ) {
die ( $oException->getMessage () ); $token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
} }
unset ( $_SESSION ['PROCESS'] ); unset ( $_SESSION ['PROCESS'] );