/*
* error.c: Halibut error handling
/*
* Error flags
static void do_error(const filepos *fpos, const char *fmt, ...)
{
do_error(NULL, "out of memory");
{
do_error(NULL, "option `-%s' requires an argument", sp);
{
do_error(NULL, "unrecognised option `-%s'", sp);
{
do_error(NULL, "character set `%s' not recognised", sp);
{
do_error(NULL, "warning: option `-%s' has no effect%s", sp, sp2);
/*
* error.c - error handlers
static NORETURN void verror(char *format, va_list ap) {
current_handler = NULL;
e->msg = to_string("ERROR: ");
}
print("ERROR: ", format, ap);
NORETURN void error(char *format, ...) {
va_start(ap, format);
verror(format, ap);
NORETURN void print_parse_error(int line, int column, char *msg, va_list ap) {
string_append(b, msg);
verror(STRING_BODY(b), ap);
/**
* Error type definitions.
*
* \file error.h
#ifndef __ERROR_H__
#define __ERROR_H__
/**
* Represents an error type. The error types are organized based on which
*
* \note Remember to update the error message and error code arrays (in the
* error C file) with the appropriate error message and code.
*/
typedef enum {
MN_ERROR_OPENING_FILE,
MN_ERROR_CLOSING_FILE,
//
// error.hpp
#ifndef ASIO_ERROR_HPP
#define ASIO_ERROR_HPP
#include "asio/detail/config.hpp"
#include "asio/error_code.hpp"
#include "asio/system_error.hpp"
#if defined(ASIO_WINDOWS) \
|| defined(ASIO_WINDOWS_RUNTIME)
# include <winerror.h>
/// INTERNAL ONLY.
# define ASIO_NATIVE_ERROR(e) implementation_defined
/// INTERNAL ONLY.
//
// error.hpp
#ifndef ASIO_ERROR_HPP
#define ASIO_ERROR_HPP
#include "asio/detail/config.hpp"
#include "asio/error_code.hpp"
#include "asio/system_error.hpp"
#if defined(ASIO_WINDOWS) \
|| defined(ASIO_WINDOWS_RUNTIME)
# include <winerror.h>
/// INTERNAL ONLY.
# define ASIO_NATIVE_ERROR(e) implementation_defined
/// INTERNAL ONLY.
//
// error.hpp
#ifndef BOOST_ASIO_ERROR_HPP
#define BOOST_ASIO_ERROR_HPP
#include <boost/cerrno.hpp>
#include <boost/system/error_code.hpp>
#include <boost/system/system_error.hpp>
#if defined(BOOST_ASIO_WINDOWS) \
|| defined(BOOST_ASIO_WINDOWS_RUNTIME)
# include <winerror.h>
/// INTERNAL ONLY.
# define BOOST_ASIO_NATIVE_ERROR(e) implementation_defined
/// INTERNAL ONLY.
//
// error.hpp
#ifndef ASIO_ERROR_HPP
#define ASIO_ERROR_HPP
#include "asio/detail/config.hpp"
#include "asio/error_code.hpp"
#include "asio/system_error.hpp"
#if defined(ASIO_WINDOWS) \
|| defined(ASIO_WINDOWS_RUNTIME)
# include <winerror.h>
/// INTERNAL ONLY.
# define ASIO_NATIVE_ERROR(e) implementation_defined
/// INTERNAL ONLY.
--
-- Error reporting
--
-- Note: this code is supposed to end in errors; not included in 'make test'
local subf= function() -- this so that we can see the call stack
error "aa"
--error({})
--error(error)
end
if err then
assert( type(stack)=="table" ) -- only true if lanes was compiled with ERROR_FULL_STACK == 1
io.stderr:write( "Lane error: "..tostring(err).."\n" )
---
io.stderr:write( "\n** Error propagation **\n" )
/*
* Error message information
#if defined(POLARSSL_ERROR_C)
#include "polarssl/error.h"
void error_strerror( int ret, char *buf, size_t buflen )
// High level error codes
if( strlen( buf ) == 0 )
snprintf( buf, buflen, "UNKNOWN ERROR CODE (%04X)", use_ret );
// If high level code is present, make a concatenation between both
// error strings.
// Low level error codes
--
-- Error reporting
--
-- Note: this code is supposed to end in errors; not included in 'make test'
local subf= function() -- this so that we can see the call stack
error "aa"
--error({})
--error(error)
end
local h= lgen()
local _,err,stack= h:join() -- wait for the lane (no automatic error propagation)
assert( type(stack)=="table" )
io.stderr:write( "Lane error: "..tostring(err).."\n" )
---
io.stderr:write( "\n** Error propagation **\n" )
/* error.c (error handling) */
*
* glp_error - display fatal error message and terminate execution
*
* void glp_error(const char *fmt, ...);
*
* The routine glp_error (implemented as a macro) formats its
va_end(arg);
xprintf("Error detected in file %s at line %d\n",
glp_errfunc glp_error_(const char *file, int line)
void glp_assert_(const char *expr, const char *file, int line)
{ glp_error_(file, line)("Assertion failed: %s\n", expr);
*
* glp_error_hook - install hook to intercept abnormal termination
/* 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.c: module displaying/handling XML parser errors
#include <libxml/parser.h>
#include <libxml/xmlerror.h>
void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
* *
* Handling of out of context errors *
/**
* xmlGenericErrorDefaultFunc:
* @ctx: an error context
* @msg: the message to display/transmit
*
* Default handler for out of context error messages.
void XMLCDECL
xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
/*
* error.c: module displaying/handling XML parser errors
#include <libxml/parser.h>
#include <libxml/xmlerror.h>
void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
* *
* Handling of out of context errors *
/**
* xmlGenericErrorDefaultFunc:
* @ctx: an error context
* @msg: the message to display/transmit
*
* Default handler for out of context error messages.
void XMLCDECL
xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
/*
* error.c: module displaying/handling XML parser errors
#include <libxml/parser.h>
#include <libxml/xmlerror.h>
void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
* *
* Handling of out of context errors *
/**
* xmlGenericErrorDefaultFunc:
* @ctx: an error context
* @msg: the message to display/transmit
*
* Default handler for out of context error messages.
void XMLCDECL
xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
/*
* error.c: module displaying/handling XML parser errors
#include <libxml/parser.h>
#include <libxml/xmlerror.h>
void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
* *
* Handling of out of context errors *
/**
* xmlGenericErrorDefaultFunc:
* @ctx: an error context
* @msg: the message to display/transmit
*
* Default handler for out of context error messages.
void XMLCDECL
xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
/*
* error.c: module displaying/handling XML parser errors
#include <libxml/parser.h>
#include <libxml/xmlerror.h>
void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
* *
* Handling of out of context errors *
/**
* xmlGenericErrorDefaultFunc:
* @ctx: an error context
* @msg: the message to display/transmit
*
* Default handler for out of context error messages.
void XMLCDECL
xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
/*
* error.c: module displaying/handling XML parser errors
#include <libxml/parser.h>
#include <libxml/xmlerror.h>
void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
* *
* Handling of out of context errors *
/**
* xmlGenericErrorDefaultFunc:
* @ctx: an error context
* @msg: the message to display/transmit
*
* Default handler for out of context error messages.
void XMLCDECL
xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {