Beispiel #1
0
// Report an error for the current token
static void lex_error(lexer_t* lexer, const char* fmt, ...)
{
  va_list ap;
  va_start(ap, fmt);
  errorv(lexer->source, lexer->token_line, lexer->token_pos, fmt, ap);
  va_end(ap);
}
Beispiel #2
0
void error(source_t* source, size_t line, size_t pos, const char* fmt, ...)
{
  va_list ap;
  va_start(ap, fmt);
  errorv(source, line, pos, fmt, ap);
  va_end(ap);
}
Beispiel #3
0
// Report an error at the specified location
static void lex_error_at(lexer_t* lexer, size_t line, size_t pos,
  const char* fmt, ...)
{
  va_list ap;
  va_start(ap, fmt);
  errorv(lexer->errors, lexer->source, line, pos, fmt, ap);
  va_end(ap);
}
Beispiel #4
0
void ast_error(errors_t* errors, ast_t* ast, const char* fmt, ...)
{
  va_list ap;
  va_start(ap, fmt);
  errorv(errors, token_source(ast->t), token_line_number(ast->t),
    token_line_position(ast->t), fmt, ap);
  va_end(ap);
}
Beispiel #5
0
PUBLIC void httpError(HttpConn *conn, int flags, cchar *fmt, ...)
{
    va_list     args;

    va_start(args, fmt);
    errorv(conn, flags, fmt, args);
    va_end(args);
}
Beispiel #6
0
void error(int level, ...)
{
    va_list ap;

    va_start(ap, level);
    errorv(NiL, level, ap);
    va_end(ap);
}
Beispiel #7
0
void
pperror(int level, ...)
{
	va_list	ap;

	va_start(ap, level);
	errorv(pp.pass, level, ap);
	va_end(ap);
}
Beispiel #8
0
void errorf(void *handle, void *discipline, int level, ...)
{
    va_list ap;

    va_start(ap, level);
    errorv((discipline
	    && handle) ? *((char **) handle) : (char *) handle, level, ap);
    va_end(ap);
}
Beispiel #9
0
Datei: errorf.c Projekt: att/ast
int errorf(void *handle, void *discipline, int level, ...) {
    va_list ap;

    va_start(ap, level);
    errorv((discipline && handle) ? *((char **)handle) : (char *)handle,
           (discipline || level < 0) ? level : (level | ERROR_LIBRARY), ap);
    va_end(ap);
    return 0;
}
Beispiel #10
0
int cleanExit(char *str,...)
{
  va_list ap;
  va_start(ap, str);
  errorv(str,ap);
  va_end(ap);
  Mix_CloseAudio();
  SDL_Quit();
  return(1);
}
Beispiel #11
0
static void
error(int level, ...)
{
	va_list		ap;

	trap();
	va_start(ap, level);
	errorv(NiL, level, ap);
	va_end(ap);
	reset(level);
}
Beispiel #12
0
PUBLIC void httpLimitError(HttpConn *conn, int flags, cchar *fmt, ...)
{
    va_list     args;

    va_start(args, fmt);
    if (conn->endpoint) {
        httpMonitorEvent(conn, HTTP_COUNTER_LIMIT_ERRORS, 1);
    }
    errorv(conn, flags, fmt, args);
    va_end(args);
}
Beispiel #13
0
static int
errorf(const regex_t* re, regdisc_t* disc, int level, ...)
{
	va_list		ap;

	trap();
	va_start(ap, level);
	errorv(NiL, level, ap);
	va_end(ap);
	reset(level);
	return 0;
}
Beispiel #14
0
void errorv_continue(errors_t* errors, source_t* source, size_t line,
  size_t pos, const char* fmt, va_list ap)
{
  if(errors->tail == NULL)
    return errorv(errors, source, line, pos, fmt, ap);

  errormsg_t* p = errors->tail;
  while(p->frame != NULL)
    p = p->frame;

  p->frame = make_errorv(source, line, pos, fmt, ap);
}
void cleanExit( char *str, ... )
{
#ifdef HAVE_SDL
    va_list ap;

    va_start( ap, str );
    errorv( str, ap );
    va_end( ap );
    Mix_CloseAudio();
    SDL_Quit();
#endif
    exit( 1 );
}
Beispiel #16
0
// Report an error
static void build_error(build_parser_t* builder, const char* fmt, ...)
{
  assert(builder != NULL);
  assert(builder->source != NULL);

  if(builder->had_error)
    return;

  va_list ap;
  va_start(ap, fmt);
  errorv(builder->source, builder->line, builder->pos, fmt, ap);
  va_end(ap);

  builder->had_error = true;
}
Beispiel #17
0
static void
errmsg(int level, int code, const char* fmt, va_list ap)
{
	if (!error_info.id)
	{
		struct _astdll*	dp = _ast_getdll();
		char*		s;
		char*		t;

		if (s = dp->_ast__argv[0])
		{
			if (t = strrchr(s, '/'))
				s = t + 1;
			error_info.id = s;
		}
	}
	errorv(fmt, level|ERROR_NOID, ap);
	if ((level & ERROR_LEVEL) >= ERROR_ERROR)
		exit(code);
}