Annotation of parser3/src/main/pa_exception.C, revision 1.12
1.12 ! parser 1: /** @file
! 2: Parser: exception class.
! 3:
! 4: Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com)
! 5:
! 6: Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf)
! 7: */
! 8: static const char *RCSId="$Id: pa_exception.C,v 1.11 2001/06/28 07:44:17 parser Exp $";
! 9:
! 10: #include <stdio.h>
! 11: #include <stdlib.h>
! 12:
! 13: #include "pa_common.h"
! 14: #include "pa_exception.h"
! 15:
! 16: void Exception::_throw(const String *atype, const String *acode,
! 17: const String *aproblem_source,
! 18: const char *comment_fmt, ...) const {
! 19: ftype=atype;
! 20: fcode=acode;
! 21: fproblem_source=aproblem_source;
! 22:
! 23: if(comment_fmt) {
! 24: va_list args;
! 25: va_start(args, comment_fmt);
! 26: vsnprintf(fcomment, MAX_STRING, comment_fmt, args);
! 27: //fcomment[0]='z';
! 28: //fcomment[1]=0;
! 29: va_end(args);
! 30: } else
! 31: fcomment[0]=0;
! 32:
! 33: int *p=(int *)(void *)&mark;
! 34: for(int i=0; i<sizeof(mark)/sizeof(int); i++)
! 35: printf("%08X,", *p++);
! 36: printf("\n");
! 37:
! 38: longjmp(mark, 1);
! 39: }
E-mail: