Windows error message

This commit is contained in:
h_vogt 2009-04-22 21:15:30 +00:00
parent 21b2de60d6
commit 6c55df1cb5
5 changed files with 17 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2009-04-22 Holger Vogt
* inpcom.c measure.c mystring.c alloc.c: show Windows error
message before exiting
2009-04-21 Dietmar Warning
* devices/bsim4/*.c, /vbic/*.c: Parameter declaration in function header

View File

@ -1371,6 +1371,7 @@ inp_readall(FILE *fp, struct line **data, int call_depth, char *dir_name)
if ( ciprefix(".lib", buffer) ) {
if ( found_lib_name == TRUE ) {
fprintf( stderr, "ERROR: .lib is missing .endl!\n" );
winmessage("Fatal error in SPICE");
exit(-1);
}
@ -2475,6 +2476,7 @@ inp_expand_macro_in_str( char *str )
}
if ( close_paren_ptr == NULL ) {
fprintf( stderr, "ERROR: did not find closing parenthesis for function call in str: %s\n", orig_str );
winmessage("Fatal error in SPICE");
exit( -1 );
}
*close_paren_ptr = '\0';
@ -2502,6 +2504,7 @@ inp_expand_macro_in_str( char *str )
if ( num_parameters[i] != num_params ) {
fprintf( stderr, "ERROR: parameter mismatch for function call in str: %s\n", orig_ptr );
winmessage("Fatal error in SPICE");
exit( -1 );
}
@ -2818,6 +2821,7 @@ get_param_name( char *line )
else
{
fprintf( stderr, "ERROR: could not find '=' on parameter line '%s'!\n", line );
winmessage("Fatal error in SPICE");
exit(-1);
}
return name;
@ -2853,6 +2857,7 @@ inp_get_param_level( int param_num, char ***depends_on, char **param_names, char
if ( index2 > total_params )
{
fprintf( stderr, "ERROR: unable to find dependency parameter for %s!\n", param_names[param_num] );
winmessage("Fatal error in SPICE");
exit( -1 );
}
temp_level = inp_get_param_level( index2, depends_on, param_names, param_strs, total_params, level );
@ -3132,6 +3137,7 @@ inp_sort_params( struct line *start_card, struct line *end_card, struct line *ca
if ( ind != num_params )
{
fprintf( stderr, "ERROR: found wrong number of parameters during levelization ( %d instead of %d parameter s)!\n", ind, num_params );
winmessage("Fatal error in SPICE");
exit(-1);
}

View File

@ -591,6 +591,7 @@ do_measure( char *what, bool chk_only ) {
// see if number of measurements exceeds fixed array size of 20,000
if ( index >= 20000 ) {
fprintf( stderr, "ERROR: number of measurements exceeds 20,000!\nAborting...\n" );
winmessage("Fatal error in SPICE");
exit(-1);
}
}

View File

@ -73,7 +73,7 @@ rs (char *s)
{ /*basic line input, limit= 80 chars */
int max, i;
char c;
exit (-1);
/* exit (-1); */
max = maxlen (s);
i = 0;
sini (s, max);
@ -137,6 +137,7 @@ stringbug (char *op, char *s, char *t, char c)
fprintf (stderr, "{%c}\n", c);
fprintf (stderr, "Aborting...\n");
winmessage("Fatal error in SPICE");
exit (1);
/* The code below cannot be reached */
@ -770,6 +771,7 @@ new (long sz)
if (p == NULL)
{ /* fatal error */
ws (" new() failure. Program halted.\n");
winmessage("Fatal error in SPICE");
exit (1);
}
return p;

View File

@ -51,6 +51,7 @@ tmalloc(size_t num)
#endif
if (!s){
fprintf(stderr,"malloc: Internal Error: can't allocate %ld bytes. \n",(long)num);
winmessage("Fatal error in SPICE");
exit(EXIT_BAD);
}
return(s);
@ -134,6 +135,7 @@ trealloc(void *ptr, size_t num)
}
if (!s) {
fprintf(stderr,"realloc: Internal Error: can't allocate %ld bytes.\n", (long)num);
winmessage("Fatal error in SPICE");
exit(EXIT_BAD);
}
return(s);
@ -175,6 +177,7 @@ hrealloc(void *ptr, size_t num)
}
if (!s) {
fprintf(stderr,"HeapReAlloc: Internal Error: can't allocate %ld bytes.\n", (long)num);
winmessage("Fatal error in SPICE");
exit(EXIT_BAD);
}
return(s);