diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-09-06 09:40:02 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-09-06 09:40:02 +0000 |
commit | de1ea87b4ba8cdcad6a3686f1ecdbe954ad41aaa (patch) | |
tree | 136b1cbd35d16a55803be686d6a6d8acae5cf08c /src/exceptions | |
parent | b7b8d6da07309da4e16397f662a4e2db46c0869a (diff) | |
download | zetacomponents-graph-de1ea87b4ba8cdcad6a3686f1ecdbe954ad41aaa.zip zetacomponents-graph-de1ea87b4ba8cdcad6a3686f1ecdbe954ad41aaa.tar.gz |
- Missed to commit font type exception file.
- Added more verbose text for font rendering exception.
Diffstat (limited to 'src/exceptions')
-rw-r--r-- | src/exceptions/font_rendering.php | 7 | ||||
-rw-r--r-- | src/exceptions/font_type.php | 24 |
2 files changed, 30 insertions, 1 deletions
diff --git a/src/exceptions/font_rendering.php b/src/exceptions/font_rendering.php index 7bebe2a..1a575ae 100644 --- a/src/exceptions/font_rendering.php +++ b/src/exceptions/font_rendering.php @@ -18,7 +18,12 @@ class ezcGraphFontRenderingException extends ezcGraphException { public function __construct( $string, $size, $width, $height ) { - parent::__construct( "Could not fit string <{$string}> with font size <{$size}> in box <{$width} * {$height}>." ); + parent::__construct( "Could not fit string <{$string}> with font size <{$size}> in box <{$width} * {$height}>. +Possible solutions to solve this problem: + - Decrease the amount of steps on the axis. + - Increase the size of the chart. + - Decrease the minimum font size. + - Use a font which consumes less space for each character." ); } } diff --git a/src/exceptions/font_type.php b/src/exceptions/font_type.php new file mode 100644 index 0000000..33cecad --- /dev/null +++ b/src/exceptions/font_type.php @@ -0,0 +1,24 @@ +<?php +/** + * File containing the ezcGraphUnknownFontTypeException class + * + * @package Graph + * @version //autogen// + * @copyright Copyright (C) 2005, 2006 eZ systems as. All rights reserved. + * @license http://ez.no/licenses/new_bsd New BSD License + */ +/** + * Exception thrown if font type is unknown or not supported. + * + * @package Graph + * @version //autogen// + */ +class ezcGraphUnknownFontTypeException extends ezcGraphException +{ + public function __construct( $file, $extension ) + { + parent::__construct( "Unknown font type <{$extension}> of file <{$file}>." ); + } +} + +?> |