# CrashLogOSX Class Reference

OSX implementation for the crash logger. More...

Inheritance diagram for CrashLogOSX:

## Public Member Functions
| CrashLogOSX (int signum)
| A crash log is always generated by signal.
bool | MakeCrashLog ()
| Generate the crash log.
void | DisplayCrashDialog () const
| Show a dialog with the crash information.
## Private Member Functions
char * | LogOSVersion (char *buffer, const char *last) const
| Writes OS' version to the buffer.
char * | LogError (char *buffer, const char *last, const char *message) const
| Writes actually encountered error to the buffer.
char * | LogStacktrace (char *buffer, const char *last) const
| Writes the stack trace to the buffer, if there is information about it available.
## Private Attributes
int | signum
| Signal that has been thrown.
char | filename_log [MAX_PATH]
| Path of crash.log.
char | filename_save [MAX_PATH]
| Path of crash.sav.
char | filename_screenshot [MAX_PATH]
| Path of crash.(png|bmp|pcx).

## Detailed Description

OSX implementation for the crash logger.

Definition at line 45 of file crashlog_osx.cpp.

## Constructor & Destructor Documentation

CrashLogOSX::CrashLogOSX | ( | int | signum | ) | `[inline]`

A crash log is always generated by signal.

Parameters:

  | signum | the signal that was caused by the crash.

Definition at line 156 of file crashlog_osx.cpp.

References filename_log, filename_save, and filename_screenshot.

## Member Function Documentation

void CrashLogOSX::DisplayCrashDialog | ( |  | ) | const`[inline]`

Show a dialog with the crash information.

Definition at line 196 of file crashlog_osx.cpp.

References filename_log, filename_save, filename_screenshot, lastof, CrashLog::message, seprintf(), and ShowMacDialog().

Referenced by HandleCrash().

char* CrashLogOSX::LogError | ( | char * | buffer,
|  | const char * | last,
|  | const char * | message |
| ) |  |  | const`[inline, private, virtual]`

Writes actually encountered error to the buffer.

Parameters:

  | buffer | The begin where to write at.
  | last | The last position in the buffer to write to.
  | message | Message passed to use for possible errors. Can be NULL.

Returns:
  the position of the `'` ' character after the buffer.

Implements CrashLog.

Definition at line 72 of file crashlog_osx.cpp.

References seprintf(), and signum.

char* CrashLogOSX::LogOSVersion | ( | char * | buffer,
|  | const char * | last |
| ) |  |  | const`[inline, private, virtual]`

Writes OS' version to the buffer.

Parameters:

  | buffer | The begin where to write at.
  | last | The last position in the buffer to write to.

Returns:
  the position of the `'` ' character after the buffer.

Implements CrashLog.

Definition at line 53 of file crashlog_osx.cpp.

References seprintf().

char* CrashLogOSX::LogStacktrace | ( | char * | buffer,
|  | const char * | last |
| ) |  |  | const`[inline, private, virtual]`

Writes the stack trace to the buffer, if there is information about it available.

Parameters:

  | buffer | The begin where to write at.
  | last | The last position in the buffer to write to.

Returns:
  the position of the `'` ' character after the buffer.

Implements CrashLog.

Definition at line 84 of file crashlog_osx.cpp.

References seprintf().

bool CrashLogOSX::MakeCrashLog | ( |  | ) | `[inline]`

Generate the crash log.

Definition at line 164 of file crashlog_osx.cpp.

References filename_log, filename_save, filename_screenshot, CrashLog::FillCrashLog(), lastof, CrashLog::WriteCrashLog(), CrashLog::WriteSavegame(), and CrashLog::WriteScreenshot().

Referenced by HandleCrash().

## Field Documentation

int CrashLogOSX::signum`[private]`

Signal that has been thrown.

Definition at line 47 of file crashlog_osx.cpp.

Referenced by LogError().

The documentation for this class was generated from the following file:

- src/os/macosx/crashlog_osx.cpp