Hi - I’m having a strange problem. I am throwing below CHTTPException:
throw new CHttpException(404,'Not found');
And catching it in my function. It is being catched correctly and message is also being printed correctly, but the issue is with StatusCode. Seems like CHTTPException is not setting the status code of exception and that’s why instead of 404 I’m getting 500 status code. Below is the catch statement:
Hi Keith - Thanks for your reply. I got it. But what exactly is the difference between HTTP Exception Code and HTTP Status Code. I have googled it and found it same. So why there is a facility of two different parameters in YII?