0
votes
1answer
47 views

Automating form error handling

I'm not sure if I'm being clever or making things more difficult. I'm working within a custom MVC framework, and within some of my "views" which contain forms I'm preserving input and styling errors ...
8
votes
4answers
562 views

Is error suppressing bad practice?

On a SO question I asked here about some code I was unsure about, someone replied "BTW, horrible code there: it uses the error suppressing symbol (@) a lot." Is there a reason why this is bad ...
1
vote
1answer
194 views

How do I go about debugging a PHP error?

I am coming from .NET to PHP. I am playing around with a long file written by someone else (called "cryptographp.inc.php"). It builds and returns an image to the browser. I want to show the image ...
0
votes
1answer
140 views

Is there a standard for Error Codes?

I've created a gateway which receives a POST from cUrl on one system which is a well-formed XML string. After processing the gateway sends back a response XML. All the fields in the XML are required ...
0
votes
2answers
161 views

Custom error handling

I'm trying to figure out the best way to handle custom errors in my application. Option 1: if(expr) { } else { $_SESSION['error'] = "Some message describing the error"; } Option 2: if(expr) { ...
0
votes
1answer
654 views

PHP MVC error handling, view display and user permissions

I am building a moderation panel from scratch in a MVC approach and a lot of questions cropped up during development. I would like to hear from others how they handle these situations. Error ...
10
votes
4answers
4k views

Handling Errors In PHP When Using MVC

I've been using Codeigniter a lot recently, but one thing that gets on my nerves is handling errors and displaying them to the user. I've never been good at handling errors without it getting messy. ...
10
votes
3answers
2k views

`trigger_error` vs `throw Exception` in the context of PHP's magic methods

I'm having a debate with a colleague over the correct usage (if any) of trigger_error in the context of magic methods. Firstly, I think that trigger_error should be avoided except for this one case. ...