ROX-CLib: error.c File Reference

- Main Page
- Data Structures
- Files
- Related Pages

- File List
- Globals

# error.c File Reference

Display error message. More...

`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <stdarg.h>`
`#include <gtk/gtk.h>`
`#include "rox.h"`
`#include "error.h"`
`#include "rox-clib.h"`

## Functions
void | rox_error_init (void)
void | rox_error (const char *fmt,...)
void | rox_error_report_gerror (GError *err, int del)
void | rox_error_queue (GError *err)
gboolean | rox_error_queue_empty (void)
GError * | rox_error_queue_peek (void)
GError * | rox_error_queue_fetch (void)
GError * | rox_error_queue_peek_last (void)
GError * | rox_error_queue_fetch_last (void)
void | rox_error_queue_flush (void)
void | rox_error_queue_report (void)
## Variables
GQuark | rox_error_quark = 0

## Detailed Description

Display error message.

## Function Documentation

void rox_error | ( | const char * | fmt,
|  |  | ... |
| ) |  |  |

Display an error message in a modal dialogue box.

Parameters:

  `[in]` | fmt | printf-style format string, followed by the arguments, to generate the message

void rox_error_init | ( | void |  | ) |

Initialize error system. This is called by rox_init_with_domain() and should not be called directly.

void rox_error_queue | ( | GError * | err | ) |

Push an error onto the end of the error queue. ROX-CLib assumes responsibilty for deleting the error.

Parameters:

  `[in]` | err | error to queue

gboolean rox_error_queue_empty | ( | void |  | ) |

Returns:
  `TRUE` if the are no errors in the queue.

GError* rox_error_queue_fetch | ( | void |  | ) |

Return the error at the head of the error queue and remove it from the queue. The caller assumes responsibilty for deleting the error.

Returns:
  error, or `NULL` if no errors in queue

GError* rox_error_queue_fetch_last | ( | void |  | ) |

Return the error at the end of the error queue and remove it from the queue. The caller assumes responsibilty for deleting the error.

Returns:
  error, or `NULL` if no errors in queue

void rox_error_queue_flush | ( | void |  | ) |

Delete all errors from the error queue.

GError* rox_error_queue_peek | ( | void |  | ) |

Return the error at the head of the error queue, leaving it on the queue.

Returns:
  error, or `NULL` if no errors in queue

GError* rox_error_queue_peek_last | ( | void |  | ) |

Return the error at the end of the error queue, leaving it on the queue.

Returns:
  error, or `NULL` if no errors in queue

void rox_error_queue_report | ( | void |  | ) |

Report all errors (using rox_error_report_gerror()) in the queue in the order in which they were queued.

void rox_error_report_gerror | ( | GError * | err,
|  | int | del |
| ) |  |  |

Report an error (via rox_error()) stored in a GError type.

Parameters:

  `[in,out]` | err | error to report
  `[in]` | del | if non-zero the error is passed to g_error_free() after reporting.

## Variable Documentation

GQuark rox_error_quark = 0

Quark used by ROX-CLib in creating GErrors. This is initialized by rox_error_init().