title: Is there a C# method to return same data at any point in execution as Exception.ToString()
body: <p>I want to log the current location of code in a logger with the same details that exceptions have, e.g.:</p>
  <pre><code>   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
     at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
     at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean&amp; dataReady)
     at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
     at System.Data.SqlClient.SqlDataReader.get_MetaData()
  </code></pre>
  <p>What methods are available for this, or is it best to rather throw an exception and then handle it with <code>try</code> <code>catch</code>?</p>