home *** CD-ROM | disk | FTP | other *** search
- /*
- Error.c
- */
-
- #include "Error.h"
-
-
- void
- _Error ( short code , char * file , int line ) {
-
- Handle h ;
- unsigned char buf [ 32 ] ;
- unsigned char fileStr [ 256 ] ;
- unsigned char lineStr [ 32 ] ;
-
- if ( code ) {
-
- unsigned char * to = & fileStr [ 1 ] ;
-
- NumToString ( line , lineStr ) ;
- while ( * file ) {
- * ( to ++ ) = ( unsigned char ) * ( file ++ ) ;
- }
- fileStr [ 0 ] = to - fileStr - 1 ;
-
- h = GetResource ( 'Estr' , code ) ;
- if ( h ) {
- HLock ( h ) ;
- ParamText ( ( unsigned char * ) * h , fileStr , lineStr , NULL ) ;
- } else {
- NumToString ( code , buf ) ;
- ParamText ( buf , fileStr , lineStr , NULL ) ;
- }
- if ( 1 == Alert ( 129 , NULL ) ) {
- ExitToShell ( ) ;
- }
- }
- }
-