Created
June 4, 2014 08:50
-
-
Save KentaKomai/0457f37cdd7728ae57cb to your computer and use it in GitHub Desktop.
StackTrace 中身
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 | |
{ | |
throw new Exception(); | |
} | |
catch (Exception exp) | |
{ | |
StackTrace st = new StackTrace(exp, true); | |
StackFrame sf = st.GetFrame(0); | |
Console.WriteLine(sf.GetFileName()); | |
Console.WriteLine(sf.GetFileLineNumber()); | |
Console.WriteLine(sf.GetFileColumnNumber()); | |
Console.WriteLine(exp.Message); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment