sf_error.c
Go to the documentation of this file.
1 #include "sf_error.h"
2 
3 #include <stdarg.h>
4 #include <stdlib.h>
5 
6 const char *sf_error_messages[] = {"no error",
7  "singularity",
8  "underflow",
9  "overflow",
10  "too slow convergence",
11  "loss of precision",
12  "no result obtained",
13  "domain error",
14  "invalid input argument",
15  "other error",
16  NULL};
17 
18 /* If this isn't volatile clang tries to optimize it away */
19 static volatile sf_action_t sf_error_actions[] = {
20  SF_ERROR_IGNORE, /* SF_ERROR_OK */
21  SF_ERROR_IGNORE, /* SF_ERROR_SINGULAR */
22  SF_ERROR_IGNORE, /* SF_ERROR_UNDERFLOW */
23  SF_ERROR_IGNORE, /* SF_ERROR_OVERFLOW */
24  SF_ERROR_IGNORE, /* SF_ERROR_SLOW */
25  SF_ERROR_IGNORE, /* SF_ERROR_LOSS */
26  SF_ERROR_IGNORE, /* SF_ERROR_NO_RESULT */
27  SF_ERROR_IGNORE, /* SF_ERROR_DOMAIN */
28  SF_ERROR_IGNORE, /* SF_ERROR_ARG */
29  SF_ERROR_IGNORE, /* SF_ERROR_OTHER */
30  SF_ERROR_IGNORE /* SF_ERROR__LAST */
31 };
32 
35 }
36 
38  return sf_error_actions[(int)code];
39 }
40 
41 void sf_error(const char *func_name, sf_error_t code, const char *fmt, ...) {
42  va_list ap;
43  va_start(ap, fmt);
44  va_end(ap);
45 }
gtsam.examples.DogLegOptimizerExample.int
int
Definition: DogLegOptimizerExample.py:111
sf_action_t
sf_action_t
Definition: sf_error.h:22
sf_error_set_action
void sf_error_set_action(sf_error_t code, sf_action_t action)
Definition: sf_error.c:33
sf_error_t
sf_error_t
Definition: sf_error.h:8
sf_error_get_action
sf_action_t sf_error_get_action(sf_error_t code)
Definition: sf_error.c:37
sf_error.h
gtsam.examples.DogLegOptimizerExample.action
action
Definition: DogLegOptimizerExample.py:115
sf_error_actions
static volatile sf_action_t sf_error_actions[]
Definition: sf_error.c:19
SF_ERROR_IGNORE
@ SF_ERROR_IGNORE
Definition: sf_error.h:23
sf_error_messages
const char * sf_error_messages[]
Definition: sf_error.c:6
sf_error
void sf_error(const char *func_name, sf_error_t code, const char *fmt,...)
Definition: sf_error.c:41
NULL
#define NULL
Definition: ccolamd.c:609
conf.code
code
Definition: wrap/pybind11/docs/conf.py:73


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:13:18