---
name: "im_error_clear"
section: "3"
platform: "linux"
package: "libvips-dev"
version: "7.20.7-1+b3"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/im_error"
---

# im\_error\_clear(3)

handle error messages from VIPS

Part of [im\_error(3)](/im_error/3.md).

## NAME

im\_error\_buffer, im\_verror, im\_error, im\_error\_clear, im\_warn, im\_diag, error\_exit - handle error messages from VIPS

## SYNOPSIS

**#include \<vips/vips.h\>**

**const char \*im\_error\_buffer( void )**

**void im\_verror( const char \*domain, const char \*fmt, va\_list ap )**

**void im\_error( const char \*domain, const char \*fmt, ... )**

**void im\_error\_system( int errno, const char \*domain, const char \*fmt, ... )**

**void im\_error\_clear()**

**void im\_warn( const char \*domain, const char \*fmt, ... )**

**void im\_diag( const char \*domain, const char \*fmt, ... )**

**void error\_exit( const char \*fmt, ... )**

## DESCRIPTION

**[im\_error(3)](/im_error/3.md)** formats its arguments as printf and appends the string, with a newline, to the error buffer. The **domain** argument indicates the error source and should not be marked for translation.

For example, the call:

  im\_error( "mystuff", \_( "bad argument %d" ), a );

might appear in the error buffer as:

  mystuff: bad argument 12

**[im\_verror(3)](/im_verror/3.md)** works exactly as **[im\_error(3)](/im_error/3.md)** but takes stdarg arguments.

**im\_error\_system(3)** works exactly as **[im\_error(3)](/im_error/3.md)** but additionally will translate and append a system error code.

**[im\_error\_buffer(3)](/im_error_buffer/3.md)** returns a pointer to the start of the error buffer.

**[im\_error\_clear(3)](/im_error_clear/3.md)** empties the error buffer.

**[error\_exit(3)](/error_exit/3.md)** formats its arguments as printf and sends the result to the error output, together with the contents of the error log, before terminating with an error status.

**[im\_warn(3)](/im_warn/3.md)** works as  **im\_error(),** but output is sent to the list of warnings.

If an environment variable IM\_WARNING exists, messages are suppressed. Warnings should be used for non-critical recoverable errors such as values being clipped.

**[im\_diag(3)](/im_diag/3.md)** works as  **im\_error(),** but output is sent to the list of diagnosic errors.

If an environment variable IM\_DIAGNOSTICS exists, messages are suppressed. Diagnostics should be used to give extra feedback about the result of the operation.

## SEE ALSO

[error\_exit(3)](/error_exit/3.md), im\_intro(3).

## COPYRIGHT

Birkbeck College

## AUTHOR

N. Dessipris - 22/04/1991
