libsyncml 0.5.4

- Main Page
- Modules
- Data Structures
- Files

Functions
SyncML Errors
Low Level API

Libsyncml's error reporting facilities. More...

Collaboration diagram for SyncML Errors:

## Functions

SmlError ** | smlErrorRef (SmlError **error)
void | smlErrorDeref (SmlError **error)
SmlBool | smlErrorIsSet (SmlError **error)
| Checks if the error is set.
SmlErrorType | smlErrorGetType (SmlError **error)
| Returns the type of the error.
const char * | smlErrorPrint (SmlError **error)
| Returns the message of the error.
void | smlErrorUpdate (SmlError **error, const char *format,...)
| Updates the error message.
void | smlErrorDuplicate (SmlError **target, SmlError **source)
| Duplicates the error into the target.
void | smlErrorSet (SmlError **error, SmlErrorType type, const char *format,...)
| Sets the error.
void | smlErrorSetType (SmlError **error, SmlErrorType type)
| Sets the type of an error.
SmlErrorClass | smlErrorGetClass (SmlError **error)
| Gets the error class.

## Detailed Description

Libsyncml's error reporting facilities.

## Function Documentation

SmlBool smlErrorIsSet | ( | SmlError ** | error | ) |

Checks if the error is set.

Parameters:

  error | A pointer to a error struct to check

Returns:
  TRUE if the error is set, FALSE otherwise

Definition at line 268 of file sml_error.c.

Referenced by smlErrorDuplicate(), smlErrorGetClass(), smlErrorGetType(), smlErrorPrint(), smlErrorSetVargs(), and smlErrorUpdate().

SmlErrorType smlErrorGetType | ( | SmlError ** | error | ) |

Returns the type of the error.

Parameters:

  error | The error

Returns:
  The type of the error

Definition at line 285 of file sml_error.c.

Here is the call graph for this function:

const char* smlErrorPrint | ( | SmlError ** | error | ) |

Returns the message of the error.

Parameters:

  error | The error to print

Returns:
  The message of the error or NULL if no error

Definition at line 299 of file sml_error.c.

Referenced by smlAssemblerAddHeader(), smlAssemblerAddStatusFull(), smlAssemblerCheckSize(), smlAssemblerEndCommand(), smlAssemblerGetSpace(), smlAssemblerNew(), smlAssemblerReserveStatus(), smlAssemblerRun(), smlAssemblerStart(), smlAssemblerStartCommand(), smlCommandNewPartialChange(), smlDataSyncAbort(), smlDevInfAgentRequestDevInf(), smlDevInfAgentSendDevInf(), smlDsSessionCloseMap(), smlDsSessionCloseSync(), smlDsSessionSendAlert(), smlDsSessionSendSync(), smlItemGetData(), smlItemStealData(), smlManagerObjectRegister(), smlManagerStop(), smlParserEnd(), smlParserGetCommand(), smlParserGetHeader(), smlParserGetStatus(), smlParserNew(), smlParserStart(), smlSessionEnd(), smlSessionEndCommand(), smlSessionFlush(), smlSessionNew(), smlSessionSendCommand(), smlSessionSendReply(), smlSessionStartCommand(), smlThreadCallFunction(), smlTransportFinalize(), smlTransportFree(), smlTransportInitialize(), smlTransportNew(), smlTransportSetConfigOption(), smlXmlAssemblerNew(), and smlXmlParserStart().

Here is the call graph for this function:

void smlErrorUpdate | ( | SmlError ** | error,
|  | const char * | format,
|  |  | ...
| ) |  |

Updates the error message.

You can use this function to update the error message on a error. You can use the old error->message as a parameter for this function.

Parameters:

  error | A pointer to a error struct to update
  format | The new message

Definition at line 317 of file sml_error.c.

Here is the call graph for this function:

void smlErrorDuplicate | ( | SmlError ** | target,
|  | SmlError ** | source
| ) |  |

Duplicates the error into the target.

Parameters:

  target | The target error to update
  source | The source error which to duplicate

Definition at line 337 of file sml_error.c.

Here is the call graph for this function:

void smlErrorSet | ( | SmlError ** | error,
|  | SmlErrorType | type,
|  | const char * | format,
|  |  | ...
| ) |  |

Sets the error.

You can use this function to set the error to the given type and message

Parameters:

  error | A pointer to a error struct to set
  type | The Error type to set
  format | The message

Definition at line 355 of file sml_error.c.

Referenced by smlAssemblerAddHeader(), smlAssemblerEndCommand(), smlAssemblerGetSpace(), smlAssemblerNew(), smlAssemblerStartCommand(), smlCommandNewPartialChange(), smlDsSessionCloseSync(), smlDsSessionSendSync(), smlErrorDuplicate(), smlItemGetData(), smlItemStealData(), smlManagerObjectRegister(), smlParserNew(), smlParserStart(), smlThreadCallFunction(), smlTransportFinalize(), smlTransportInitialize(), smlTransportNew(), smlTransportSetConfigOption(), smlTryMalloc0(), smlXmlAssemblerNew(), and smlXmlParserStart().

Here is the call graph for this function:

void smlErrorSetType | ( | SmlError ** | error,
|  | SmlErrorType | type
| ) |  |

Sets the type of an error.

Parameters:

  error | A pointer to a error struct to set
  type | The Error type to set

Definition at line 369 of file sml_error.c.

SmlErrorClass smlErrorGetClass | ( | SmlError ** | error | ) |

Gets the error class.

Parameters:

  error | A pointer to a error struct

Returns:
  The error class

Definition at line 382 of file sml_error.c.

Here is the call graph for this function: