Loading...
Searching...
No Matches
globus_error_generic.h
Go to the documentation of this file.
/*
* Copyright 1999-2006 University of Chicago
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef GLOBUS_ERROR_GENERIC_H
#define GLOBUS_ERROR_GENERIC_H
#include "globus_object.h"
#include "globus_module.h"
#include <stdarg.h>
#ifdef __cplusplus
extern "C" {
#endif
#define GLOBUS_ERROR_TYPE_GLOBUS (&GLOBUS_ERROR_TYPE_GLOBUS_DEFINITION)
extern const globus_object_type_t GLOBUS_ERROR_TYPE_GLOBUS_DEFINITION;
#ifndef DOXYGEN
globus_object_t *
globus_error_construct_error(
globus_module_descriptor_t * base_source,
globus_object_t * base_cause,
int type,
const char * source_file,
const char * source_func,
int source_line,
const char * short_desc_format,
...);
globus_object_t *
globus_error_v_construct_error(
globus_module_descriptor_t * base_source,
globus_object_t * base_cause,
int type,
const char * source_file,
const char * source_func,
int source_line,
const char * short_desc_format,
va_list ap);
globus_object_t *
globus_error_initialize_error(
globus_object_t * error,
globus_module_descriptor_t * base_source,
globus_object_t * base_cause,
int type,
const char * source_file,
const char * source_func,
int source_line,
const char * short_desc_format,
va_list ap);
#endif
globus_module_descriptor_t *
globus_error_get_source(
globus_object_t * error);
void
globus_error_set_source(
globus_object_t * error,
globus_module_descriptor_t * source_module);
globus_object_t *
globus_error_get_cause (
globus_object_t * error);
void
globus_error_set_cause (
globus_object_t * error,
globus_object_t * causal_error);
int
globus_error_get_type(
globus_object_t * error);
void
globus_error_set_type(
globus_object_t * error,
const int type);
char *
globus_error_get_short_desc(
globus_object_t * error);
void
globus_error_set_short_desc(
globus_object_t * error,
const char * short_desc_format,
...);
char *
globus_error_get_long_desc(
globus_object_t * error);
void
globus_error_set_long_desc(
globus_object_t * error,
const char * long_desc_format,
...);
globus_bool_t
globus_error_match(
globus_object_t * error,
globus_module_descriptor_t * module,
int type);
char *
globus_error_print_chain(
globus_object_t * error);
char *
globus_error_print_friendly(
globus_object_t * error);
typedef char * (*globus_error_print_friendly_t)(
globus_object_t * error,
const globus_object_type_t * type);
#define GLOBUS_ERROR_TYPE_MULTIPLE (&GLOBUS_ERROR_TYPE_MULTIPLE_DEFINITION)
extern const globus_object_type_t GLOBUS_ERROR_TYPE_MULTIPLE_DEFINITION;
globus_object_t *
globus_error_construct_multiple(
globus_module_descriptor_t * base_source,
int type,
const char * fmt,
...);
void
globus_error_mutliple_add_chain(
globus_object_t * multiple_error,
globus_object_t * chain,
const char * fmt,
...);
globus_object_t *
globus_error_multiple_remove_chain(
globus_object_t * multiple_error);
#ifdef __cplusplus
}
#endif
#endif /* GLOBUS_ERROR_GENERIC_H */
globus_error_construct_multiple
globus_object_t * globus_error_construct_multiple(globus_module_descriptor_t *base_source, int type, const char *fmt,...)
Definition globus_error_generic.c:1067
globus_error_mutliple_add_chain
void globus_error_mutliple_add_chain(globus_object_t *multiple_error, globus_object_t *chain, const char *fmt,...)
Definition globus_error_generic.c:1145
globus_error_multiple_remove_chain
globus_object_t * globus_error_multiple_remove_chain(globus_object_t *multiple_error)
Definition globus_error_generic.c:1201
globus_module.h
Reference Counting Module Activation and Deactivation.
globus_bool_t
int globus_bool_t
Boolean type.
Definition globus_types.h:93
globus_error_set_type
void globus_error_set_type(globus_object_t *error, const int type)
Definition globus_error_generic.c:425
globus_error_set_short_desc
void globus_error_set_short_desc(globus_object_t *error, const char *short_desc_format,...)
Definition globus_error_generic.c:488
globus_error_get_type
int globus_error_get_type(globus_object_t *error)
Definition globus_error_generic.c:389
globus_error_set_source
void globus_error_set_source(globus_object_t *error, globus_module_descriptor_t *source_module)
Definition globus_error_generic.c:321
globus_error_get_short_desc
char * globus_error_get_short_desc(globus_object_t *error)
Definition globus_error_generic.c:455
globus_error_get_cause
globus_object_t * globus_error_get_cause(globus_object_t *error)
Definition globus_error_generic.c:344
globus_error_get_long_desc
char * globus_error_get_long_desc(globus_object_t *error)
Definition globus_error_generic.c:554
globus_error_set_cause
void globus_error_set_cause(globus_object_t *error, globus_object_t *causal_error)
Definition globus_error_generic.c:366
globus_error_get_source
globus_module_descriptor_t * globus_error_get_source(globus_object_t *error)
Definition globus_error_generic.c:300
globus_error_set_long_desc
void globus_error_set_long_desc(globus_object_t *error, const char *long_desc_format,...)
Definition globus_error_generic.c:582
globus_error_construct_error
globus_object_t * globus_error_construct_error(globus_module_descriptor_t *base_source, globus_object_t *base_cause, int type, const char *source_file, const char *source_func, int source_line, const char *short_desc_format,...)
Definition globus_error_generic.c:85
globus_error_v_construct_error
globus_object_t * globus_error_v_construct_error(globus_module_descriptor_t *base_source, globus_object_t *base_cause, const int type, const char *source_file, const char *source_func, int source_line, const char *short_desc_format, va_list ap)
Definition globus_error_generic.c:154
globus_error_initialize_error
globus_object_t * globus_error_initialize_error(globus_object_t *error, globus_module_descriptor_t *base_source, globus_object_t *base_cause, int type, const char *source_file, const char *source_func, int source_line, const char *short_desc_format, va_list ap)
Definition globus_error_generic.c:225
globus_error_print_chain
char * globus_error_print_chain(globus_object_t *error)
Definition globus_error_generic.c:725
globus_error_print_friendly
char * globus_error_print_friendly(globus_object_t *error)
Definition globus_error_generic.c:910
globus_error_match
globus_bool_t globus_error_match(globus_object_t *error, globus_module_descriptor_t *module, int type)
Definition globus_error_generic.c:657