Timeline for Whats the best way to handle errors in code?
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 8, 2014 at 21:05 | comment | added | mau | Sure, it is an abstract solution possibly won't work with a different arquitecture. Just wanted to point out an idea which I reuse for many projects. I haven't used EF for long time, I'd rather use ServiceStack OrmLite. | |
May 8, 2014 at 15:15 | comment | added | Ben Aaronson | Ah, okay. I can see how this would be useful, though it depends a bit on the architecture. For example, if a repository pattern is being used on top of EF's, that might be a more natural place to put this kind of exception "routing" code. | |
May 8, 2014 at 15:05 | comment | added | mau | @BenAaronson actually analizeException is just a regex evaluation to check for database messages and translate to human readable text. All the meat is on the code I provided. | |
May 8, 2014 at 15:00 | comment | added | Ben Aaronson |
I suspect that what Ortund is asking about mostly boils down to what you've hidden behind analizeException .
|
|
May 8, 2014 at 14:43 | history | answered | mau | CC BY-SA 3.0 |