Changeset 3787


Ignore:
Timestamp:
05/17/10 16:21:03 (15 years ago)
Author:
Mathieu Morlighem
Message:

added proc number in parallel error message that is now ALWAYS shown

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/shared/Exceptions/Exceptions.cpp

    r3775 r3787  
    33 */
    44
     5#ifdef HAVE_CONFIG_H
     6#include "config.h"
     7#else
     8#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
     9#endif
    510#include "../shared.h"
    611#include "../../include/include.h"
     
    3035
    3136void ErrorException::Report(){
     37        extern int my_rank;
    3238
    3339        if (function_name=="" || file_line==0){ //WINDOWS
    34                 _printf_("%s%s","Error message: ",what());
     40                printf("%s%s","Error message: ",what());
    3541        }
    3642        else{
    37                 _printf_("\n%s%s%s%i\n","??? Error using ==> ",file_name.c_str()," at ",file_line);
    38                 _printf_("%s%s%s\n\n",function_name.c_str()," error message: ",what());
     43                #ifdef _PARALLEL_
     44                        printf("\n[%i] %s%s%s%i\n",my_rank,"??? Error using ==> ",file_name.c_str()," at ",file_line);
     45                        printf("[%i] %s%s%s\n\n",my_rank,function_name.c_str()," error message: ",what());
     46                #else
     47                        printf("\n%s%s%s%i\n","??? Error using ==> ",file_name.c_str()," at ",file_line);
     48                        printf("%s%s%s\n\n",function_name.c_str()," error message: ",what());
     49                #endif
    3950        }
    4051        return;
Note: See TracChangeset for help on using the changeset viewer.