Created
November 8, 2024 21:59
-
-
Save javierguerrero/e4b9c65544ca545bca4a0c4c7c1aeb0b to your computer and use it in GitHub Desktop.
exception_handling_csharp_chapter6_1.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try | |
{ | |
// Código que lanza una excepción | |
} | |
catch (Exception ex) | |
{ | |
Console.WriteLine("Mensaje de error: " + ex.Message); | |
Console.WriteLine("Traza de pila: " + ex.StackTrace); | |
if (ex.InnerException != null) | |
{ | |
Console.WriteLine("Excepción interna: " + ex.InnerException.Message); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment