|
HDK
|
#include "pxr/pxr.h"#include "pxr/base/tf/api.h"#include <cstdio>#include <ctime>#include <iosfwd>#include <string>
Include dependency graph for stackTrace.h:Go to the source code of this file.
Functions | |
| TF_API std::string | TfGetStackTrace () |
| Gets both the C++ and the python stack and returns it as a string. More... | |
| TF_API void | TfPrintStackTrace (FILE *file, const std::string &reason) |
Prints both the C++ and the python stack to the file provided. More... | |
| TF_API void | TfPrintStackTrace (std::ostream &out, std::string const &reason) |
| Prints both the C++ and the python stack to the stream provided. More... | |
| TF_API void | TfLogStackTrace (const std::string &reason, bool logtodb=false) |
| TF_API void | TfLogCrash (const std::string &reason, const std::string &message, const std::string &additionalInfo, TfCallContext const &context, bool logToDB) |
| TF_API time_t | TfGetAppLaunchTime () |
| Returns the application's launch time. More... | |
| TF_API time_t TfGetAppLaunchTime | ( | ) |
Returns the application's launch time.
| TF_API std::string TfGetStackTrace | ( | ) |
Gets both the C++ and the python stack and returns it as a string.
| TF_API void TfLogCrash | ( | const std::string & | reason, |
| const std::string & | message, | ||
| const std::string & | additionalInfo, | ||
| TfCallContext const & | context, | ||
| bool | logToDB | ||
| ) |
Creates a nicely formatted message describing a crash and writes it to a temporary file.
reason is a very short descriptive title for the error (ie, FATAL_ERROR) message further describes the crash (ie, Dereferenced an invalid MfHandle) additionalInfo is secondary, possibly multi-line, information that should be included in the report. callContext describes the location of the crash logToDB controls whether the stack will be added to the stack_trace db table.
Logs both the C++ and the python stack to a file in /var/tmp A message is printed to stderr reporting that a stack trace has been taken and what file it has been written to. If logtodb is true, then the stack trace will be added to the stack_trace database table.
Prints both the C++ and the python stack to the file provided.