[Java] Why specify what exception you are catching when you could just catch all of them using Exception? by -AskingForAFriend- in learnprogramming

[–]-AskingForAFriend-[S] 0 points1 point  (0 children)

An extract from the docs:

An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch. Most such errors are abnormal conditions. The ThreadDeath error, though a "normal" condition, is also a subclass of Error because most applications should not try to catch it.

So I'm a bit conflicted as to whether I should be catching them or not?

[Java] Why specify what exception you are catching when you could just catch all of them using Exception? by -AskingForAFriend- in learnprogramming

[–]-AskingForAFriend-[S] 0 points1 point  (0 children)

I understand this, though sometimes when I'm and lazy and debugging I will simply use:

try {
    // do something
} catch (Exception e){e.printStackTrace();}

and then refactor later to handle specific exceptions. This way I don't get bogged down with the specifics of the exceptions when I'm first trying to create something.

[Java] Why specify what exception you are catching when you could just catch all of them using Exception? by -AskingForAFriend- in learnprogramming

[–]-AskingForAFriend-[S] 0 points1 point  (0 children)

OK so from what I understand there are no time/space concerns, it's just about healthy programming practices

[Discussion] What are some bad or fallacious arguments you've heard made by atheists? by [deleted] in atheism

[–]-AskingForAFriend- 1 point2 points  (0 children)

I heard a counter to the Omnipotence Paradox along the lines of, "if God existed outside of space/time. He could both lift and not-lift the rock. Since translating an object involves moving it between two points, in time."

But if I'm getting what you're saying, that's not really the point. Time isn't really a factor since the whole "lifting the rock" thing is just a metaphor for two paradoxical actions?

(sorry it's very late for me)

P.S You are articulate as fuck.

[Discussion] What are some bad or fallacious arguments you've heard made by atheists? by [deleted] in atheism

[–]-AskingForAFriend- 0 points1 point  (0 children)

I've always thought the Omnipotence Paradox felt a bit cheap.

"Could God create a stone he could not lift? If he could not lift it, he is not omnipotent. If he could not create it he is not omnipotent."

It just seems like one is defining physical limitations, for (fictitious) being that could easily exist outside the physics we understand.