Changeset 320 for cleversvg/trunk/document/csDocument.class.php
- Timestamp:
- 02/26/08 22:55:16 (4 years ago)
- Files:
-
- 1 modified
-
cleversvg/trunk/document/csDocument.class.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
cleversvg/trunk/document/csDocument.class.php
r319 r320 664 664 if ($this->strict_mode === true) 665 665 { 666 set_error_handler(array('csDocument', 'handleValidationError'), E_ALL);667 666 if (!$dom->validate()) 668 667 { 669 668 throw new csException('This SVG Document does not validate'); 670 669 } 671 restore_error_handler(); 672 } 673 } 674 675 /** 676 * Handle validation errors 677 * 678 * @throws csException 679 */ 680 public static function handleValidationError($code, $string, $file, $line, $context) 681 { 682 $message = $string ? $string : 'No message provided for this error'; 683 echo sprintf('SVG document doesn\'t validate: %s (%d)', $message, $code); 684 exit; 670 } 685 671 } 686 672
