# Namespace KCrash

Module | kdeui
Namespace | KCrash

This class handles segmentation-faults. By default it displays a message-box saying the application crashed. This default can be overridden by setting a custom crash handler with setCrashHandler(). If a function is specified with setEmergencySaveFunction() it will be called by the default crash handler, giving the application a chance to save its data.

### enums

- CrashFlag { KeepFDs, SaferDialog, AlwaysDirectly }

enum details

### methods

- crashHandler ( )

  returns KCrash.HandlerType
  Not implemented

  Returns the installed crash handler. Returns the crash handler

- defaultCrashHandler (signal)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  signal | int |

  The default crash handler.

  signal - the signal number

- emergencySaveFunction ( )

  returns KCrash.HandlerType
  Not implemented

  Return the currently set emergency save function. Returns the emergency save function

- setApplicationName (name)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  name | QString |

  Sets the application name name which should be passed to Dr. Konqi, our nice crash display application.

  name - the name of the application, as shown in Dr. Konqi

- setApplicationPath (path)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  path | QString |

  Sets the application path which should be passed to Dr. Konqi, our nice crash display application.

  path - the application path.

- setCrashHandler (handler)

  returns Nothing
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  handler | KCrash.HandlerType | defaultCrashHandler

  Install a function to be called in case a SIGSEGV is caught.

  handler - HandlerType handler can be one of

- null in which case signal-catching is disabled
(by calling signal(SIGSEGV, SIG_DFL))
- if handler is omitted the default crash handler is installed.
- an user defined function in the form:
static (if in a class) void myCrashHandler(int);

handler - the crash handler

- setEmergencySaveFunction (saveFunction)

  returns Nothing
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  saveFunction | KCrash.HandlerType | 0

  Installs a function which should try to save the applications data. It is the crash handler's responsibility to call this function. Therefore, if no crash handler is set, the default crash handler is installed to ensure the save function is called.

  saveFunction - the handler to install

- setFlags (flags)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  flags | KCrash.CrashFlags |

  Set DrKonqi fire-up options.

  flags - ORed together CrashFlags

### enums - detail

- CrashFlag { KeepFDs, SaferDialog, AlwaysDirectly }

  Options to determine how KCrash should behave while firing up DrKonqi.

  | KeepFDs | - 1 | - |
  | SaferDialog | - 2 | - |
  | AlwaysDirectly | - 4 | - |