---
name: "ping_get_error"
section: "3"
platform: "linux"
package: "liboping-dev"
version: "1.10.0-5+b5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/ping_get_error"
---

# ping\_get\_error(3)

Return the last error message

## NAME

ping\_get\_error - Return the last error message

## SYNOPSIS

```
  #include <oping.h>
  const char *ping_get_error (pingobj_t *obj);
```

## DESCRIPTION

The **ping\_get\_error** method returns an error message indicating the last error encountered. **This method is not thread safe whatsoever.**

## RETURN VALUE

A `"const"` string representing the last error or an empty string if no error was encountered yet.

## SEE ALSO

[**liboping**(3)](/liboping/3.md)

## AUTHOR

liboping is written by Florian "octo" Forster \<ff at octo.it\>. Its homepage can be found at \<http://noping.cc/\>.

Copyright (c) 2006-2017 by Florian "octo" Forster.
