[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 08/11: Add exception
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 08/11: Add exception |
Date: |
Wed, 12 Nov 2014 23:06:47 +0000 |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 0e4b44478db970cdb195d4bcc3bc5fcefa3a1d07
Author: Dany De Bontridder <address@hidden>
Date: Wed Nov 12 22:34:49 2014 +0100
Add exception
---
include/class_document_export.php | 32 +++++++++++++++++++++-----------
1 files changed, 21 insertions(+), 11 deletions(-)
diff --git a/include/class_document_export.php
b/include/class_document_export.php
index bfda2cd..38a561b 100644
--- a/include/class_document_export.php
+++ b/include/class_document_export.php
@@ -52,21 +52,31 @@ class Document_Export
*/
function concatenate_pdf()
{
- $this->check_file();
- $stmt = PDFTK . " " . $this->store_pdf . '/stamp_*pdf output ' .
$this->store_pdf . '/result.pdf';
- $status = 0;
- echo $stmt;
- passthru($stmt, $status);
+ try
+ {
+ $this->check_file();
+ $stmt=PDFTK." ".$this->store_pdf.'/stamp_*pdf output
'.$this->store_pdf.'/result.pdf';
+ $status=0;
+ echo $stmt;
+ passthru($stmt, $status);
- if ($status <> 0)
+ if ($status<>0)
+ {
+ $cnt_feedback=count($this->feedback);
+ $this->feedback[$cnt_feedback]['file']='result.pdf';
+ $this->feedback[$cnt_feedback]['message']=' cannot concatenate
PDF';
+ $this->feedback[$cnt_feedback]['error']=$status;
+ }
+ }
+ catch (Exception $exc)
{
- $cnt_feedback = count($this->feedback);
- $this->feedback[$cnt_feedback]['file'] = 'result.pdf';
- $this->feedback[$cnt_feedback]['message'] = ' cannot concatenate
PDF';
- $this->feedback[$cnt_feedback]['error'] = $status;
+ $cnt_feedback=count($this->feedback);
+ $this->feedback[$cnt_feedback]['file']='result.pdf';
+ $this->feedback[$cnt_feedback]['message']=$exc->getMessage();
+ $this->feedback[$cnt_feedback]['error']=0;
}
}
-
+
function move_file($p_source, $target)
{
$this->check_file();
- [Noalyss-commit] [noalyss] branch master updated (b777353 -> 98a27b5), Dany De Bontridder, 2014/11/12
- [Noalyss-commit] [noalyss] 01/11: Task #639 - Traduction : anglais ', Dany De Bontridder, 2014/11/12
- [Noalyss-commit] [noalyss] 03/11: Task #639 - Traduction : anglais ', Dany De Bontridder, 2014/11/12
- [Noalyss-commit] [noalyss] 02/11: Task #639 - Traduction : anglais ', Dany De Bontridder, 2014/11/12
- [Noalyss-commit] [noalyss] 05/11: Bug in ajax_card for adding banque, Dany De Bontridder, 2014/11/12
- [Noalyss-commit] [noalyss] 04/11: Task #639 - Traduction : anglais ', Dany De Bontridder, 2014/11/12
- [Noalyss-commit] [noalyss] 06/11: Bug in NOALYSS_SQL, Dany De Bontridder, 2014/11/12
- [Noalyss-commit] [noalyss] 07/11: Task #639 - Traduction : anglais Renforcement sécurité, Dany De Bontridder, 2014/11/12
- [Noalyss-commit] [noalyss] 08/11: Add exception,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 09/11: Task #1045 - Amélioration apparence : Placement boite "ajout categorie de fiche", Dany De Bontridder, 2014/11/12
- [Noalyss-commit] [noalyss] 11/11: Task #1044 - Implementation de PHPUNIT new defined variables for testing, Dany De Bontridder, 2014/11/12
- [Noalyss-commit] [noalyss] 10/11: Task #1044 - Implementation de PHPUNIT Test files inc.php could also be used with ajax, Dany De Bontridder, 2014/11/12