Skip to main content
3 votes
1 answer
40 views

I am trying to search for elements on a webpage and have used various methods, including text and XPath. It seems that the timeout option does not work the way I expected, and no exception is raised ...
Shankboy's user avatar
1 vote
1 answer
109 views

I am upgrading AWS' Java SDK from 1.x to 2.x. In 2.x, it seems that most exceptional cases are modeled with Unchecked Exceptions, as opposed to Checked Exceptions like it was in 1.x. When trying to ...
davidalayachew's user avatar
9 votes
2 answers
587 views

Checked Exceptions are powerful because they allow you to force the use-site to deal with an exceptional case. If the use-site does not handle an exceptional case (or publically announce that they are ...
davidalayachew's user avatar
4 votes
1 answer
95 views

I am compiling this class: public class Test { // No throws clause here public static void main(String[] args) { doThrow(new SQLException()); } static void doThrow(Exception ...
sparsh goyal's user avatar
1 vote
0 answers
163 views

how can I describe the exceptions thrown from callable in phpDoc? For example I have: /** * @param callable(int): bool */ function (callable $foo, int $number): ?bool { try { return $foo(...
Александр Рязанов's user avatar
-1 votes
1 answer
222 views

I was going through some Exception Handling concepts in Java and came across the concept of final rethrow. I read the following article- https://baptiste-wicht.com/posts/2010/05/better-exception-...
ayush's user avatar
  • 696
0 votes
0 answers
23 views

I have a bunch of methods, with similar signatures, compatible with Function, they each declare throws InterruptedException, and I put them in a list and select one by its index and call its apply(). ...
davidbak's user avatar
  • 6,098
1 vote
0 answers
44 views

Why is explicit division By zero not considered as compile time exception in JAVA ? Example : int x =9; int y = (int)x/0; Shouldnt compiler notify me about it ? I tried running the same and finding ...
Rohit Rohra's user avatar
2 votes
0 answers
49 views

JLS 11.2.3 says that it is a compile time error if a method body can throw a checked exception and it does not declare the class (or a parent class) in its throws clause. In the following code, ...
MattDs17's user avatar
  • 421
0 votes
2 answers
155 views

I'm working on an importer for LitJson, to import float values from ints, and doubles, and if overflow-checking is enabled, I want to wrap a potential overflow exception in a JsonException with a bit ...
user avatar
0 votes
3 answers
80 views

Consider the following java code: public void write(FrameConsumer fc) throws FFmpegFrameRecorder.Exception{ frameStream.forEach(n -> fc.consume(n)); } In this case "...
CopperCableIsolator's user avatar
0 votes
0 answers
34 views

I got one doubt regarding exception handling. We have checked and unchecked exceptions. Why they have given like that? irrespective checked or unchecked we have to handle the exception. Then i am ...
Praveen kumar's user avatar
6 votes
1 answer
5k views

New Java programmers frequently encounter errors phrased like this: "error: unreported exception <XXX>; must be caught or declared to be thrown" where XXX is the name of some ...
Stephen C's user avatar
  • 723k
2 votes
1 answer
85 views

Problem I have a class with two constructors. One of them (A) throws a checked exception, and the other one (B) calls the first one. // Constructor A public ArrayValue(DataType rules, Value... content)...
xtay2's user avatar
  • 983
1 vote
1 answer
348 views

This is the block of code inside the boolean method that I want to check if there are any empty or null fields. It returns true if none of them are. If they are, it throws a custom exception for each ...
nikosidij's user avatar

15 30 50 per page
1
2 3 4 5
10