/***************************************************************************
error.h
Class for error handling
#ifndef ERRORCLASS
#define ERRORCLASS
/// Error and Notice Handling
/** This class is intended to handle all output to the user. Output is
* divided into notices and warnings/errors. Output of any message is
* greater than max_warning_level, the program is terminated and all warnings
* and errors are output.
*
error.c -
{
#define defined_error(name, num) if (err == num) return name;
#define undefined_error(name)
void
rb_compile_error_append(const char *fmt, ...)
buf[len++] = '\n';
rb_write_error2(buf, len);
buf[len++] = '\n';
rb_write_error2(buf, len);
if (errno_arg == 0)
rb_bug("%s: errno == 0 (NOERROR)", mesg);
if (errno_str)
rb_bug("%s: %s (%s)", mesg, strerror(errno_arg), errno_str);
error.c -
void
rb_compile_error(const char *file, int line, const char *fmt, ...)
buf[len++] = '\n';
rb_write_error2(buf, len);
}
rb_raise(rb_eTypeError, "wrong argument type %s (expected %s)",
VALUE rb_eFatal;
VALUE rb_eStandardError;
VALUE rb_eRuntimeError;
VALUE rb_eTypeError;
VALUE rb_eArgError;
VALUE rb_eIndexError;
VALUE rb_eKeyError;
error.c -
#ifdef HAVE_STDARG_PROTOTYPES
rb_compile_error(const char *fmt, ...)
#else
}
rb_raise(rb_eTypeError, "wrong argument type %s (expected %s)",
VALUE rb_eFatal;
VALUE rb_eStandardError;
VALUE rb_eRuntimeError;
VALUE rb_eTypeError;
VALUE rb_eArgError;
VALUE rb_eIndexError;
VALUE rb_eRangeError;
VALUE rb_eNameError;
VALUE rb_eNoMethodError;
VALUE rb_eSecurityError;
/* error.h
*
#ifndef CTAO_CRYPT_ERROR_H
#define CTAO_CRYPT_ERROR_H
/* error codes */
enum {
MAX_ERROR_SZ = 80, /* max size of error string */
MAX_CODE_E = -100, /* errors -101 - -199 */
OPEN_RAN_E = -101, /* opening random device error */
READ_RAN_E = -102, /* reading random device error */
WINCRYPT_E = -103, /* windows crypt init error */
CRYPTGEN_E = -104, /* windows crypt generation error */
/***
*error.h - DOS error codes
*Purpose:
* DOS calls all return error codes through AX. If an error occurred then
* the carry bit will be set and the error code is in AX. If no error occurred
* then the carry bit is reset and AX contains returned info.
*
* Since the set of error codes is being extended as we extend the operating
* system, we have provided a means for applications to ask the system for a
* recommended course of action when they receive an error.
*
* The GetExtendedError system call returns a universal error, an error
* location and a recommended course of action. The universal error code is
* a symptom of the error REGARDLESS of the context in which GetExtendedError
* is issued.
error.c -
#ifdef HAVE_STDARG_PROTOTYPES
rb_compile_error(const char *fmt, ...)
#else
}
rb_raise(rb_eTypeError, "wrong argument type %s (expected %s)",
VALUE rb_eFatal;
VALUE rb_eStandardError;
VALUE rb_eRuntimeError;
VALUE rb_eTypeError;
VALUE rb_eArgError;
VALUE rb_eIndexError;
VALUE rb_eRangeError;
VALUE rb_eNameError;
VALUE rb_eNoMethodError;
VALUE rb_eSecurityError;
error.c -
#ifdef HAVE_STDARG_PROTOTYPES
rb_compile_error(const char *fmt, ...)
#else
VALUE rb_eFatal;
VALUE rb_eStandardError;
VALUE rb_eRuntimeError;
VALUE rb_eTypeError;
VALUE rb_eArgError;
VALUE rb_eIndexError;
VALUE rb_eRangeError;
VALUE rb_eNameError;
VALUE rb_eNoMethodError;
VALUE rb_eSecurityError;
/* error.c -- error handler for noninteractive utilities
Copyright (C) 1990-1992 Free Software Foundation, Inc.
/* Out of memory errors which could not be forwarded to the client are sent to
/* If non-zero, error will use the CVS protocol to stdout to report error
*/
int error_use_protocol;
#ifndef strerror
extern char *strerror (int);
#endif
/* Print the program name and error message MESSAGE, which is a printf-style
* ERRMSG will disappear as well when ERRNUM is not present). ERRMSG
* represents the system dependent message returned by strerror (ERRNUM), when
error.c -
void
rb_compile_error(const char *file, int line, const char *fmt, ...)
void
rb_compile_error_append(const char *fmt, ...)
buf[len++] = '\n';
rb_write_error2(buf, len);
}
rb_raise(rb_eTypeError, "wrong argument type %s (expected %s)",
etype = rb_obj_classname(obj);
rb_raise(rb_eTypeError, mesg, etype, data_type->wrap_struct_name);
etype = RTYPEDDATA_TYPE(obj)->wrap_struct_name;
rb_raise(rb_eTypeError, mesg, etype, data_type->wrap_struct_name);
VALUE rb_eFatal;
VALUE rb_eStandardError;
VALUE rb_eRuntimeError;
/*
* error.c - functions for ssh error handling
/**
* @defgroup libssh_error The SSH error functions.
*
* Functions for error handling.
*
* @brief Registers an error with a description.
*
* @param error The place to store the error.
*
* @param code The class of error.
*/
void ssh_set_error(void *error, int code, const char *descr, ...) {
struct error_struct *err = error;
error.c -
#ifdef HAVE_STDARG_PROTOTYPES
rb_compile_error(const char *fmt, ...)
#else
}
rb_raise(rb_eTypeError, "wrong argument type %s (expected %s)",
VALUE rb_eFatal;
VALUE rb_eStandardError;
VALUE rb_eRuntimeError;
VALUE rb_eTypeError;
VALUE rb_eArgError;
VALUE rb_eIndexError;
VALUE rb_eRangeError;
VALUE rb_eNameError;
VALUE rb_eNoMethodError;
VALUE rb_eSecurityError;
error.c -
#ifdef HAVE_STDARG_PROTOTYPES
rb_compile_error(const char *fmt, ...)
#else
}
rb_raise(rb_eTypeError, "wrong argument type %s (expected %s)",
VALUE rb_eFatal;
VALUE rb_eStandardError;
VALUE rb_eRuntimeError;
VALUE rb_eTypeError;
VALUE rb_eArgError;
VALUE rb_eIndexError;
VALUE rb_eRangeError;
VALUE rb_eNameError;
VALUE rb_eNoMethodError;
VALUE rb_eSecurityError;
--------------------------------------------------------------------------------
-- error.lua: error handling convenience wrapper
local log, dbg, spam, log_error = make_loggers("lua-aplicado/error", "ERR")
local error_tag = unique_object()
local is_error_object = function(err)
return not not (is_table(err) and err[1] == error_tag)
end
local error_handler_for_call = function(msg)
if not is_error_object(msg) then
msg = debug_traceback(msg)
log_error(msg)
/* Error handler for noninteractive utilities
Copyright (C) 1990-1998, 2000-2007 Free Software Foundation, Inc.
#include "error.h"
/* If NULL, error will flush stdout, then print on stderr the program
name, a colon and a space. Otherwise, error will call this
function without parameters instead. */
void (*error_print_progname) (void);
/* This variable is incremented each time `error' is called. */
unsigned int error_message_count;
/* In GNU libc we want do not want to use the common name `error' directly.
Instead make it a weak alias. */