cvsuser     03/12/07 03:44:14

  Modified:    src      exceptions.c
  Log:
  dont print error location for exit
  
  Revision  Changes    Path
  1.44      +6 -4      parrot/src/exceptions.c
  
  Index: exceptions.c
  ===================================================================
  RCS file: /cvs/public/parrot/src/exceptions.c,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -w -r1.43 -r1.44
  --- exceptions.c      4 Dec 2003 10:30:28 -0000       1.43
  +++ exceptions.c      7 Dec 2003 11:44:14 -0000       1.44
  @@ -1,7 +1,7 @@
   /* exceptions.c
    *  Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
    *  CVS Info
  - *     $Id: exceptions.c,v 1.43 2003/12/04 10:30:28 leo Exp $
  + *     $Id: exceptions.c,v 1.44 2003/12/07 11:44:14 leo Exp $
    *  Overview:
    *     define the internal interpreter exceptions
    *  Data Structure and Algorithms:
  @@ -102,7 +102,7 @@
       PMC *handler;
       STRING *message;
       char *m;
  -    int exit_status;
  +    int exit_status, print_location;
       /* for now, we don't check the exception class and we don't
        * look for matching handlers
        */
  @@ -123,7 +123,7 @@
           }
       } while (1);
       m = string_to_cstring(interpreter, message);
  -    exit_status = 1;
  +    exit_status = print_location = 1;
       if (m && *m) {
           fputs(m, stderr);
           if (m[strlen(m)-1] != '\n')
  @@ -133,12 +133,14 @@
           INTVAL severity =
               VTABLE_get_integer_keyed_int(interpreter, exception, 2);
           if (severity == EXCEPT_exit) {
  +            print_location = 0;
               exit_status =
                   (int)VTABLE_get_integer_keyed_int(interpreter, exception, 1);
           }
           else
               fprintf(stderr, "No exception handler and no message\n");
       }
  +    if (print_location)
       print_pbc_location(interpreter);
       Parrot_exit(exit_status);
   
  
  
  

Reply via email to