$f = new File(); $f->file_name = 'test'; $f->trans_begin(); $f->save(); $f->trans_rollback(); // Show all errors echo $f->error->string; // Or just show the transaction error echo $f->error->transaction;