ciao,
(sembra lunga... ma la domanda é cortissima.. é solo l'output che occupa spazio
.. quindi leggete vi prego..
)
se faccio questo:
Codice PHP:
//...tutto il blocco try{}
//...
catch(DbSaveException $e){
echo $e->getError()."
".$e->getQuery()."
",$e;
}
ho questo in risultato (non leggetelo... non é questo il punto):
codice:
Column 'netaliases_id' cannot be null
INSERT INTO netaliases (netaliases_id, net_id, name) VALUES (NULL, '523', 'spongsrv ')
exception 'DbSaveException' with message 'Db error: Column 'netaliases_id' cannot be null - query: INSERT INTO netaliases (netaliases_id, net_id, name) VALUES (NULL, '523', 'spongsrv ')' in /apps/sysadmin/inventory_dev/private/private_sys/osClasses/DbObject.php:170 Stack trace: #0 /apps/sysadmin/inventory_dev/private/private_sys/osClasses/DbObject.php(434): DbObject::query('INSERT INTO net...') #1 /apps/sysadmin/inventory_dev/private/private_sys/osClasses/DbObject.php(289): DbObject->saveRefs('net_id', '523') #2 /apps/sysadmin/inventory_dev/private/private_sys/osClasses/DbObject.php(334): DbObject->saveChanges() #3 /apps/sysadmin/inventory_dev/private/private_sys/osClasses/DbObject.php(285): DbObject->update() #4
......... continua per molto....
ma il fatto é che io non voglio fare un "echo" ma voglio mettere tutta sta roba in una variabile.. in modo da usare il template per stampare a video il testo.
ma se faccio cosi:
Codice PHP:
catch(DbSaveException $e){
$this->msg = $e->getError()."
".$e->getQuery()."
".$e;
}
// e poi la variabile la stapo col template
mi da questo:
codice:
Column 'netaliases_id' cannot be null
INSERT INTO netaliases (netaliases_id, net_id, name) VALUES (NULL, '523', 'spongsrv ')
Object id #15
come posso fare???????