|
Which of the following exception notification solutions is the best?
Exceptional Hoptoad exception_notification exception_logger
Started by Horace Loeb on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Not a massive fan of hoptoad, it's too easy to ignore messages... .
On a high traffic site we use an internal messaging queue for errors, then pump those back up to hoptoad .
I use hoptoad and have had nothing but a positive experience, I highly recommend it .
|
|
I am creating some custom exceptions in my application.
If I have an exception that gets thrown after testing the state of an argument, Or I have an Exception that gets thrown after testing that an int is within the proper range, should my exceptions ...
Started by Sruly on
, 11 posts
by 11 people.
Answer Snippets (Read the full thread at stackoverflow):
I'm just curious, why wouldn't you actually use the Exceptions that are already there? It sounds like these exceptions are exactly what you need, why are you against using those?
Personally if I have an indexer and the index value is out....
|
|
Hello. I can not solve this problem for a while. I would be glad for some advice.
When I try to throw an exception (self created one in Java style)
throw Exception ();
compiler make a protest:
DataTypes/Date.cpp:24: error: no matching function for call...
Started by Robin Hood on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
To elaborate:
The explicit keyword means that a single-argument constructor cannot be used to implicitly convert a variable of the... .
Thrown objects must be copyable.
Your copy constructor is marked explicit, which means it isn't really a copy constructor .
|
Ask your Facebook Friends
|
I am using Visual C++ 2005 Express Edition and get the following linker errors:
19>mylib1.lib(mylibsource1.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::exception::_Raise(void)const " (__imp_?_...
Started by Jim Buck on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
That would explain why you still have errors if you define it before your... .
Now, might include (makes sense, sharing code might reduce the size of your executable) .
The third error makes it clear that #define the _HAS_EXCEPTIONS 0 does not affect .
|
|
For a block like this:
try: #some stuff except Exception: pass
pylint raises warning W0703 'Catch "Exception"'. Why?
Started by alex on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Consider if an out of memory exception occurred - simply using "pass" isn't going to leave ....
It's considered good practice to not normally catch the root Exception object, but instead to catch more specific ones - for example IOException.
|
|
In ASP.NET,How can i know the Specific details about an exception (like What kind of Exception it is (FileNotFound /Arithmentc etc..) )from a General Exception class object
Started by Shyju on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
If you are interested in some property of a specific type of exception and you're sure about the type, just cast the exception to the type and fetch the....
You can use GetType() method to get the actual type of the exception instance.
|
|
Notice in the code below that foobar() is called if any Exception is thrown. Is there a way to do this without using the same line in every Exception?
try: foo() except(ErrorTypeA): bar() foobar() except(ErrorTypeB): baz() foobar() except(SwineFlu): print...
Started by jcoon on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Success = False try: foo() success = True except(A): bar() except(B): baz() except(C): bay:
exception_map = { ErrorTypeA : bar, ErrorTypeB : baz } try: try: somthing() except tuple(exception function raise # raise....
|
|
Is there a way to determine the exception type even know you caught the exception with a catch all?
Example:
try { SomeBigFunction(); } catch(...) { //Determine exception type here }
Started by Brian R. Bondy on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Once you had the exception instance, you would have to use a type inspection algorithm.
I do not believe there is a standard way of doing this .
Doing so would at the very least require you to be able to access the current exception.
|
|
I was told that in Java, unchecked exceptions can be caught in a try block, but if it's caught, isn't it called a checked exception?
Started by Anonymous on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Checked exceptions are exceptions that need to be....
Unchecked exceptions are subclasses of the RuntimeException or Error classes.
Unchecked exceptions are exceptions that don't need to be caught in a try - catch block.
|
|
I have a program, a part of which executes a loop. During the execution of this loop, there are exceptions. Obviously, I would like my program to run without errors, but for the sake of progress, I would like the program to execute over the entire input...
Started by inspectorG4dget on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Try: #stuff except Exception, e: print e
The traceback module provides various functions except Exception, e: print "Something happened: %s" % e
Consider using the Python logging module throw exceptions except....
|