You searched for exceptions
. We found 168
results in 0.067 seconds.
If I have class like this, which is essentially just a package object, is it breaking standards to have it follow the package naming conventions? Yes. It's not a package, it's a class, so it should follow class naming conventions...... more
I would throw some kind of RuntimeException which indicates that you think this really should never happen. That way: If it ever does happen, you find out about it rather than swallowing it and continuing Your expectation that it really... more
And I don't understand why something as simple as: (code snipped) Throws a parse exception. My guess is that it's tripping up over Jun which may not be a valid month abbreviation in your system default locale. I suggest you... more
You've fallen foul of lazy evaluation - the result of Select will create a new set of tasks each time you iterate over it. You can fix this just by calling ToList(): var tasks = _factory.CreateMessage(settings) ... more
To sum up: does "catch Exception e" catch all kinds of exceptions or should each one be named individually It catches everything of type Exception or a subclass. It will not catch other Throwables, e.g. Error. But given that all the... more
It's still there, just moved to be its own dockable window instead of a dialog: Debug => Windows => Exception Settings more
This line doesn't do what you expect: output.write(number); It's calling write on a BufferedWriter, so you should consult the documentation... at which point you find you're calling this method. public void write(int c) throws... more
I suspect the problem is that the test method is generic. Instead of using the generic Assert.Throws<T>, use the overload that accepts an exception type: [TestCase(null, typeof(ArgumentNullException))] [TestCase("",... more
To iterate over a stream element-by-element, just call the iterator() method: Iterator<String> iterator = stream.iterator(); while (iterator.hasNext()) { String element = iterator.next(); // Use element } It's not clear to... more
Is this behavior of async methods part of the language spec Yes it is. From section 10.15.1 of the C# 5 specification: If the function body terminates as the result of an uncaught exception (ยง8.9.5) the exception is recorded in... more