Comments (3)
Comment by Calum Leslie on Tuesday, 9 November 2010 16:04 (imported from Disqus):
At a previous workplace of mine I found that a wrapper, which had only a "try" and a "finally" (it was designed to clean up after exceptions), was eating exceptions. I investigated to find that between the lovingly-crafted "try" and "finally" blocks, someone had inserted the following:
catch( Exception e ) {
int i = 0;
}
An svn blame
later and I was over at the culprits desk. Apparently the code was there so that he "could debug it"; he just needed a line of code where an exception would be caught that he could put a breakpoint on.
from sgrassie.github.io.
Comment by Bob on Thursday, 13 January 2011 00:53 (imported from Disqus):
COM interop makes you do it. There are some horrendous COM APIs out there and those that dont return S_OK throw an excaption in .net, which is horrible. I recently had to use the Task Scheduler COM API and it had an unqueryable dictionary - the only way to test was to Get and catch the exception which simply was the HRESULT saying key not found.
Sometimes an empty catch block is better than a shitty COM API bombing out your app when the HRSEULT is actually perfectly valid......
from sgrassie.github.io.
Comment by stuart on Thursday, 13 January 2011 01:28 (imported from Disqus):
COM Interop is a dirty, and necessary evil, and I've had to do my fair share of it. Exception handling can be a pain, admittedly. A lot of the time though, I'd still rather add a log or trace message rather than just leave it empty.
This blog post was more aimed toward the more general case of someone swallowing an exception either because they were lazy or didn't see the benefit of logging the error or some such.
from sgrassie.github.io.
Related Issues (15)
- Hello world! HOT 1
- Limitations in Delphi HOT 1
- cakePHP with Eclipse HOT 3
- Writing a generic plugin manager in C# HOT 2
- Unit Testing Events HOT 2
- Let’s write an API library for Github HOT 2
- Custom Structuremap Dependency Resolver for ReactiveUI 5 HOT 2
- A psake build script example HOT 1
- Probably giving up my CSharp Github API HOT 2
- Extending Sandra.Snow HOT 1
- Configuring SignalR in StructureMap HOT 7
- ReactiveUI - Hello, World! HOT 1
- Github C# API: Handling the response with RestSharp HOT 1
- Switching comments from Disqus to utteranc.es and importing to Github with F# | Stuart Grassie: TemporalCohesion HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sgrassie.github.io.