util/Error: new error passing library

Replaces GLib's GError.
This commit is contained in:
Max Kellermann
2013-08-10 18:02:44 +02:00
parent c9fcc7f148
commit 29030b54c9
256 changed files with 3269 additions and 3371 deletions

View File

@@ -20,7 +20,7 @@
#ifndef MPD_TOKENIZER_HXX
#define MPD_TOKENIZER_HXX
#include "gerror.h"
class Error;
class Tokenizer {
char *input;
@@ -50,23 +50,23 @@ public:
/**
* Reads the next word.
*
* @param error_r if this function returns nullptr and
* **input_p!=0, it optionally provides a GError object in
* @param error if this function returns nullptr and
* **input_p!=0, it provides an #Error object in
* this argument
* @return a pointer to the null-terminated word, or nullptr
* on error or end of line
*/
char *NextWord(GError **error_r);
char *NextWord(Error &error);
/**
* Reads the next unquoted word from the input string.
*
* @param error_r if this function returns nullptr and **input_p!=0, it
* optionally provides a GError object in this argument
* provides an #Error object in this argument
* @return a pointer to the null-terminated word, or nullptr
* on error or end of line
*/
char *NextUnquoted(GError **error_r);
char *NextUnquoted(Error &error);
/**
* Reads the next quoted string from the input string. A backslash
@@ -76,11 +76,11 @@ public:
* @param input_p the input string; this function returns a pointer to
* the first non-whitespace character of the following token
* @param error_r if this function returns nullptr and **input_p!=0, it
* optionally provides a GError object in this argument
* provides an #Error object in this argument
* @return a pointer to the null-terminated string, or nullptr on error
* or end of line
*/
char *NextString(GError **error_r);
char *NextString(Error &error);
/**
* Reads the next unquoted word or quoted string from the
@@ -88,12 +88,12 @@ public:
* NextString().
*
* @param error_r if this function returns nullptr and
* **input_p!=0, it optionally provides a GError object in
* **input_p!=0, it provides an #Error object in
* this argument
* @return a pointer to the null-terminated string, or nullptr
* on error or end of line
*/
char *NextParam(GError **error_r);
char *NextParam(Error &error);
};
#endif