+ 1

En excepciones, puedo crear un catch personalizado para un throw?

Y en caso de que se pueda, puedo poner el catch en una clase, y el throw en otra?

23rd Jun 2020, 5:53 PM
AdriƔn
AdriƔn - avatar
8 Answers
25th Jun 2020, 5:02 AM
Sandra Meyer
Sandra Meyer - avatar
+ 1
throw new MyException(); // of course you have to implement this exception catch (MyException myException) ...
23rd Jun 2020, 5:56 PM
Sandra Meyer
Sandra Meyer - avatar
+ 1
Thank you so much, I will try it tomorrowšŸ˜šŸ˜Š you are awesome
25th Jun 2020, 5:05 AM
AdriƔn
AdriƔn - avatar
+ 1
You're welcome
25th Jun 2020, 5:08 AM
Sandra Meyer
Sandra Meyer - avatar
+ 1
Thank you so much, thats work! šŸ˜šŸ˜Š
25th Jun 2020, 5:14 PM
AdriƔn
AdriƔn - avatar
+ 1
Estoy haciendo un juego en Android y por eso me hacĆ­a falta, disculpa las molestiasšŸ˜Š
25th Jun 2020, 5:15 PM
AdriƔn
AdriƔn - avatar
0
Thank you
24th Jun 2020, 12:18 AM
AdriƔn
AdriƔn - avatar
0
Sorry, can you show me that with the code? Because I'm doing that and not work, pleasešŸ™šŸ»
25th Jun 2020, 3:29 AM
AdriƔn
AdriƔn - avatar