add log and comment
This commit is contained in:
parent
d4bc53660b
commit
6c85fbbc30
@ -39,6 +39,11 @@ abstract class CommonDocGenerator
|
|||||||
public $error='';
|
public $error='';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @var string[] Array of error strings
|
||||||
|
*/
|
||||||
|
public $errors = array();
|
||||||
|
|
||||||
|
/**
|
||||||
* @var DoliDB Database handler.
|
* @var DoliDB Database handler.
|
||||||
*/
|
*/
|
||||||
protected $db;
|
protected $db;
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||||
* Copyright (C) 2018 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -46,7 +47,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
|||||||
public $emetteur;
|
public $emetteur;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array() Minimum version of PHP required by module.
|
* @var array Minimum version of PHP required by module.
|
||||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||||
*/
|
*/
|
||||||
public $phpmin = array(5, 4);
|
public $phpmin = array(5, 4);
|
||||||
@ -351,6 +352,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
|||||||
catch(Exception $e)
|
catch(Exception $e)
|
||||||
{
|
{
|
||||||
$this->error=$e->getMessage();
|
$this->error=$e->getMessage();
|
||||||
|
dol_syslog($e->getMessage(), LOG_INFO);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
// After construction $odfHandler->contentXml contains content and
|
// After construction $odfHandler->contentXml contains content and
|
||||||
@ -366,6 +368,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
|||||||
}
|
}
|
||||||
catch(OdfException $e)
|
catch(OdfException $e)
|
||||||
{
|
{
|
||||||
|
dol_syslog($e->getMessage(), LOG_INFO);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define substitution array
|
// Define substitution array
|
||||||
@ -402,6 +405,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
|||||||
}
|
}
|
||||||
catch(OdfException $e)
|
catch(OdfException $e)
|
||||||
{
|
{
|
||||||
|
dol_syslog($e->getMessage(), LOG_INFO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Replace tags of lines
|
// Replace tags of lines
|
||||||
@ -434,9 +438,11 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
|||||||
}
|
}
|
||||||
catch(OdfException $e)
|
catch(OdfException $e)
|
||||||
{
|
{
|
||||||
|
dol_syslog($e->getMessage(), LOG_INFO);
|
||||||
}
|
}
|
||||||
catch(SegmentException $e)
|
catch(SegmentException $e)
|
||||||
{
|
{
|
||||||
|
dol_syslog($e->getMessage(), LOG_INFO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$listlines->merge();
|
$listlines->merge();
|
||||||
@ -460,6 +466,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
|||||||
}
|
}
|
||||||
catch(OdfException $e)
|
catch(OdfException $e)
|
||||||
{
|
{
|
||||||
|
dol_syslog($e->getMessage(), LOG_INFO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -474,6 +481,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
|||||||
$odfHandler->exportAsAttachedPDF($file);
|
$odfHandler->exportAsAttachedPDF($file);
|
||||||
}catch (Exception $e){
|
}catch (Exception $e){
|
||||||
$this->error=$e->getMessage();
|
$this->error=$e->getMessage();
|
||||||
|
dol_syslog($e->getMessage(), LOG_INFO);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -482,6 +490,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
|||||||
$odfHandler->saveToDisk($file);
|
$odfHandler->saveToDisk($file);
|
||||||
}catch (Exception $e){
|
}catch (Exception $e){
|
||||||
$this->error=$e->getMessage();
|
$this->error=$e->getMessage();
|
||||||
|
dol_syslog($e->getMessage(), LOG_INFO);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,10 +39,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
|
|||||||
*/
|
*/
|
||||||
abstract class ModelePDFCommandes extends CommonDocGenerator
|
abstract class ModelePDFCommandes extends CommonDocGenerator
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* @var string Error code (or message)
|
|
||||||
*/
|
|
||||||
public $error='';
|
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user