Ignore:
Timestamp:
Mar 31, 2010, 1:32:46 PM (15 years ago)
Author:
Pieter Naber
Message:

Updated ErrorHandler to use our LogHandler. Updated LogHandler with an adjustable error level.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/inc/KMLFile.class.php

    r7632 r7637  
    5555                </kml>';
    5656
    57         private $fileFirst = 'type,host_name,has_been_checked,check_execution_time,current_state,last_hard_state,last_check,problem_has_been_acknowledged';
     57        static $fileFirst = 'type,host_name,has_been_checked,check_execution_time,current_state,last_hard_state,last_check,problem_has_been_acknowledged';
    5858        private $fileContent = array('string', 'string', 'integer', 'double', 'integer', 'integer', 'integer', 'integer');
    5959
     
    9494
    9595        public function parseFile($file) {
    96                 $fileContents = explode("\r\n", $nodeStatus->getFile());
     96                $fileContents = explode("\r\n", $file);
    9797
    98                 if ($fileContents[0] != $this->fileFirst) {
    99                         // TODO: Better error description
    100                         trigger_error();
     98                if ($fileContents[0] != KMLFile::$fileFirst) {
     99                        trigger_log(LOG_WARNING, 'Contents of file do not match with template of first line', __FILE__, __LINE__);
    101100                }
    102101
     
    106105
    107106                        if (count($lineContent) != count($this->fileContent)) {
    108                                 // TODO: Better error description
    109                                 trigger_error();
     107                                trigger_log(LOG_WARNING, 'Contents of file do not match with template of lines', __FILE__, __LINE__);
    110108                        }
    111109
Note: See TracChangeset for help on using the changeset viewer.