What to do with exceptions in repository classes?
If an error/exception occurs in a repository class, should that exception get a. caught & logged, or b. thrown to the caller (a service -- what should happen with it there?) ...
If an error/exception occurs in a repository class, should that exception get a. caught & logged, or b. thrown to the caller (a service -- what should happen with it there?) ...
Ok so again my question is kind of a best practices/techniques question so I'm assuming there will be a few different ways to handle this. So, to what degree should I factor in error handling? As an example, say I havee a basic function in my model which retrieves a customers record ie function get_customer($customer_id) { $this->...
There's been a lot of examples on error handling here at SO since MVC 1 first came out and on specifically 404 error handling but since a lot of stuff changed with version 2 and new techniques emerged I would like to ask this question of what is the latest, preferably most optimal way of handling 404 (and other) errors in ASP.NET MVC 2. ...
How do you capture errors that happen on client side when building RIA apps using Flex and Silverlight? What are the common practices? I have seen some asynch js calls to a web service implemented but would like to know how the community is dealing with it. ...
I have an application which relies on a soap server to produce content. Additionally authentication to the site is based on a seperate LDAP server. Obviously if either of these are down or not responding the site is down. I am trying to lay out a design such that I can have error reporting for site admins and also give a nice messag...
this code works fine: procedure TForm2.Timer1Timer(Sender: TObject); var Text: string; begin SetLength (Text,555); GetWindowText (getforegroundwindow, PChar (Text),555); Form2.gtListBox1.Items.Add ( IntToStr (getforegroundwindow) + ': ' + Text); end; but when i put var Text: string; from Timer1Timer event handler to ...
I have objectdatasource and I am trying to find a way to capture the error that is thrown by the SELECT method. anyone idea how it can be done? Page level error handling is preferred, not capturing error at the application_error in global.asax thanks, ...
Hi Guys, i'm using these two lines to update my table using codeigninter active records $this->db->where('reference_number', $reference); $this->db->update('patient', $data); what i want to de is to check weather it successfully updates the table and according to that i want to give a notification to the user, how can i check the su...
Hi previously in PHP 4 i created a custom error handler (below) to handle my own triggered errors and general PHP errors. But now PHP 5 introduces Exceptions i.e. I'm leveraging PDO for database manipulation and I'm not sure how to handle both general PHP errors and these Exceptions? function errorHandler($errno, $errstr, $errfile, $e...
Hi, I'm new to Symfony and struggling to find an elegant solution for handling errors. I know I can throw Exceptions and make my own Exception classes, but it's how to display the error to the user in the best possible fashion. For example, I've got a Card class that charges credit and debit cards, there are a variety of different prob...
Hi all. I'm writing some unit tests. The system I'm currently testing is a web-app in an MVC framework. If we want to render pages without the site-skin system we've traditionally run our code as usual, but printed a "die();" statement at the end of the function to exit before the rest of the website renders. Well now that we're addi...
I'm working on an SSIS package and the error checking is really causing it to lag. If you delete a component in the middle of a large dataflow, the error list gets populated by hundreds of Validation errors and it keeps refreshing every time you try to do anything. I turned on the DelayValidation property for the package, but that doesn'...
I have an HTA that loads up an external webpage inside a nested IFRAME. This webpage (which I don't have control over) throws an "Access Denied" error in my HTA asking the user if they "want to continue running scripts on this page". What I want to do is have my HTA suppress all scripting error messages regardless of where they originate...
So I'm reading this interview with Walter Bright about the D language in Bitwise (http://www.bitwisemag.com/copy/programming/d/interview/d_programming_language.html), and I come across this really interesting quote about language parsing: From a theoretical perspective, however, being able to generate a good diagnostic requires that ...
Hi, In a previous ticket i asked about logging PHP errors in MySQL which gives me: function myErrorHandler($errno, $errstr, $errfile, $errline) { // mysql connect etc here... $sql = "INSERT INTO `error_log` SET `number` = ".mysql_real_escape_string($errno).", `string` = ".mysql_real_escape_string($e...
When I log errors, I typically include the stack trace. This is good, but often, it's difficult to tell where the error actually is. Is it possible to set up a routine that collects, perhaps via reflection, the parameters, the local variables, etc... at the time the error has occurred? ...
I'm building something that includes javascripts on the fly asynchronously, which works, but I'm looking to improve upon the error detection (so all the errors don't just appear to come from some line near the AJAX call that pulls them down. If I'm using eval to evaluate a multiline javascript file, is there any way to trace which line ...
How to turn on all error and warnings and log them to a file but to set up all of that within the script (not changing anything in php.ini). I want to define a file name and so that all errors and warnings get logged into it. ...
I am populating combo box from database. In debug i can see that the combo box has been populated . here is the code Private Sub ComboID_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboID.SelectedIndexChanged Dim data(21) As String Try t_code.Text = ComboID.SelectedIt...
What are "best practices" concerning error handling in an ASP.NET MVC2 web app that is DDD designed? For example, let's take the most common aspect of a web app, the login: UserController: Obviously coordinates a few domain objects to eventually log in or refuse the user, and redirect to other parts of the web interface as needed. In m...