Permalink
Browse files

Fix error handling

git-svn-id: http://svn.php.net/repository/pear/packages/HTML_Page/trunk@152360 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
Klaus Guenther
Klaus Guenther committed Feb 25, 2004
1 parent a48ae28 commit 7ba73f215ee898637702b4024add4c71900d33d9
Showing with 10 additions and 6 deletions.
  1. +10 −6 Page.php
View
@@ -484,8 +484,8 @@ function _generateHead()
if (method_exists($content, "toString")) {
$strHtml .= $content->toString() . $lnEnd;
} else {
- return PEAR::raiseError('Error: Style content object does not support method toString().',
- 0,PEAR_ERROR_TRIGGER);
+ PEAR::raiseError('Error: Style content object does not support method toString().',
+ 0,PEAR_ERROR_TRIGGER);
}
} else {
@@ -530,8 +530,8 @@ function _generateHead()
if (method_exists($content, "toString")) {
$strHtml .= $content->toString() . $lnEnd;
} else {
- return PEAR::raiseError('Error: Script content object does not support method toString().',
- 0,PEAR_ERROR_TRIGGER);
+ PEAR::raiseError('Error: Script content object does not support method toString().',
+ 0,PEAR_ERROR_TRIGGER);
}
} else {
@@ -611,6 +611,7 @@ function _getDoctype()
PEAR::raiseError('Error: "'.$this->getDoctypeString().'" is an unsupported or illegal document type.',
0,PEAR_ERROR_TRIGGER);
$this->_simple = true;
+ return;
}
} // end func _getDoctype
@@ -663,8 +664,11 @@ function _getNamespace()
if ($strNamespace) {
return $strNamespace;
} else {
- return PEAR::raiseError('Error: "'.$this->getDoctypeString().'" does not have a default namespace. Use setNamespace() to define your namespace.',
- 0,PEAR_ERROR_TRIGGER);
+ PEAR::raiseError('Error: "' . $this->getDoctypeString() .
+ '" does not have a default namespace.' .
+ ' Use setNamespace() to define your namespace.',
+ 0, PEAR_ERROR_TRIGGER);
+ return;
}
} // end func _getNamespace

0 comments on commit 7ba73f2

Please sign in to comment.