snowman15 Posted November 1, 2007 Share Posted November 1, 2007 i need to format my exception with this funciton but I dont know where to put it! function that formats: function formatException(Exception $e) { return "Error {$e->getCode()}: {$e->getMessage()} " . "(line: {$e->getline()} of {$e->getfile()})"; } try:catch block Where do i put the function? try { $answer=average($myString); echo $answer."<br />"; } catch (Exception $em) { echo $em."<br />"; } Link to comment https://forums.phpfreaks.com/topic/75689-solved-exception-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.