| 1 | /* |
| 2 | * Copyright (C) 2014 Steve Harris et al. (see AUTHORS) |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU Lesser General Public License |
| 6 | * as published by the Free Software Foundation; either version 2.1 |
| 7 | * of the License, or (at your option) any later version. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU Lesser General Public License for more details. |
| 13 | * |
| 14 | * $Id$ |
| 15 | */ |
| 16 | |
| 17 | #ifndef LO_THROW_H |
| 18 | #define LO_THROW_H |
| 19 | |
| 20 | #ifdef __cplusplus |
| 21 | extern "C" { |
| 22 | #endif |
| 23 | |
| 24 | void lo_throw(lo_server s, int errnum, const char *message, const char *path); |
| 25 | |
| 26 | /*! Since the liblo error handler does not provide a context pointer, |
| 27 | * it can be provided by associating it with a particular server |
| 28 | * through this thread-safe API. */ |
| 29 | |
| 30 | void *lo_error_get_context(void); |
| 31 | |
| 32 | void lo_server_set_error_context(lo_server s, void *user_data); |
| 33 | |
| 34 | #ifdef __cplusplus |
| 35 | } |
| 36 | #endif |
| 37 | |
| 38 | #endif |