@@ -40,7 +40,9 @@ extern nr_error_t* nr_error_create(int priority,
40
40
41
41
/*
42
42
* Purpose : Create a new error for the use case where additional parameters are
43
- * passed in.
43
+ * passed in. The following parameters are required and can not be NULL: klass
44
+ * and stacktrace_json. If these are NULL, the function will return 0. The
45
+ * remaining parameters can be passed in as NULL if they are not needed.
44
46
*
45
47
* Params : 1. The importance of the error. Higher number is more important.
46
48
* 2. Message string.
@@ -77,62 +79,62 @@ extern nr_error_t* nr_error_create_additional_params(
77
79
/*
78
80
* Purpose : Get the message of an error.
79
81
*
80
- * Returns : The message of the error or NULL on failure .
82
+ * Returns : The message of the error or NULL if not defined .
81
83
*/
82
84
extern const char * nr_error_get_message (const nr_error_t * error );
83
85
/*
84
86
* Purpose : Get the klass of an error.
85
87
*
86
- * Returns : The klass of the error or NULL on failure .
88
+ * Returns : The klass of the error or NULL if not defined .
87
89
*/
88
90
extern const char * nr_error_get_klass (const nr_error_t * error );
89
91
90
92
/*
91
93
* Purpose : Get the error file of an error.
92
94
*
93
- * Returns : The error file of the error or NULL on failure .
95
+ * Returns : The error file of the error or NULL if not defined .
94
96
*/
95
97
extern const char * nr_error_get_file (const nr_error_t * error );
96
98
97
99
/*
98
100
* Purpose : Get the error line of an error.
99
101
*
100
- * Returns : The error line of the error or 0 on failure .
102
+ * Returns : The error line of the error or 0 if not defined .
101
103
*/
102
104
extern int nr_error_get_line (const nr_error_t * error );
103
105
104
106
/*
105
107
* Purpose : Get the error context of an error.
106
108
*
107
- * Returns : The error context of the error or NULL on failure .
109
+ * Returns : The error context of the error or NULL if not defined .
108
110
*/
109
111
extern const char * nr_error_get_context (const nr_error_t * error );
110
112
111
113
/*
112
114
* Purpose : Get the error number of an error.
113
115
*
114
- * Returns : The error number of the error or 0 on failure .
116
+ * Returns : The error number of the error or 0 if not defined .
115
117
*/
116
118
extern int nr_error_get_no (const nr_error_t * error );
117
119
118
120
/*
119
121
* Purpose : Get the span_id of an error.
120
122
*
121
- * Returns : The span_id of the error or NULL on failure .
123
+ * Returns : The span_id of the error or NULL if not defined .
122
124
*/
123
125
extern const char * nr_error_get_span_id (const nr_error_t * error );
124
126
125
127
/*
126
128
* Purpose : Get the time of an error.
127
129
*
128
- * Returns : The time of the error or 0 on failure .
130
+ * Returns : The time of the error or 0 if not defined .
129
131
*/
130
132
extern nrtime_t nr_error_get_time (const nr_error_t * error );
131
133
132
134
/*
133
135
* Purpose : Get the priority of an error.
134
136
*
135
- * Returns : The priority of the error or 0 on failure .
137
+ * Returns : The priority of the error or 0 if not defined .
136
138
*/
137
139
extern int nr_error_priority (const nr_error_t * error );
138
140
0 commit comments