LoginSignup
2

More than 5 years have passed since last update.

Exception 発生時に情報を収集する

Last updated at Posted at 2015-07-15
Sub dump(ex As Exception)
    debug.print("例外の日付と時刻={0}", DateTime.Now)
    debug.print("マシン名={0}", Environment.MachineName)
    Debug.Print("例外のソース={0}", ex.Source)
    Debug.Print("例外型={0}", ex.GetType.FullName)
    Debug.Print("例外メッセージ={0}", ex.Message)
    Debug.Print("例外スタックトレース={0}", ex.StackTrace)
    debug.print("呼び出しスタック={0}", Environment.StackTrace)
    Debug.Print("アプリケーションドメイン名={0}", AppDomain.CurrentDomain.FriendlyName)
    Debug.Print("アセンブリ名={0}", Reflection.Assembly.GetExecutingAssembly().FullName)
    Debug.Print("アセンブリ バージョン={0}", Reflection.Assembly.GetExecutingAssembly().GetName.Version)
    Debug.Print("スレッド ID={0}", System.Threading.Thread.CurrentThread.ManagedThreadId)
    Debug.Print("スレッド ユーザー={0}", System.Threading.Thread.CurrentPrincipal.Identity.Name)
    Debug.Print("認証タイプ={0}", System.Threading.Thread.CurrentPrincipal.Identity.AuthenticationType)
End Sub

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2