Como son las excepciones en kotlin | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

Como son las excepciones en kotlin

try catch

17th Oct 2021, 4:23 PM
Daniel šŸ˜ŠšŸ˜ŽšŸ˜‰[JS Challenger]
Daniel šŸ˜ŠšŸ˜ŽšŸ˜‰[JS Challenger] - avatar
3 Respostas
+ 2
Daniel No sƩ en Kotlin, pero por el mensaje que vƭ de SAN es parecido al de las excepciones de JavaScript.
17th Oct 2021, 6:36 PM
CGO!
CGO! - avatar
+ 1
usamos el bloque try-catch para el manejo de excepciones en el programa. El bloque try encierra el cĆ³digo que es responsable de lanzar una excepciĆ³n y el bloque catch se usa para manejar la excepciĆ³n. Este bloque debe escribirse dentro de los mĆ©todos principal o de otro tipo. try { // code that can throw exception } catch(e: ExceptionName) { // catch the exception and handle it }
17th Oct 2021, 5:11 PM
SAN
SAN - avatar
+ 1
SAN Gracias
17th Oct 2021, 5:15 PM
Daniel šŸ˜ŠšŸ˜ŽšŸ˜‰[JS Challenger]
Daniel šŸ˜ŠšŸ˜ŽšŸ˜‰[JS Challenger] - avatar