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 />"; } Quote Link to comment https://forums.phpfreaks.com/topic/75689-solved-exception-help/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.