Changeset e6a122 for pcp/src/errors.c
- Timestamp:
- Apr 21, 2008, 2:19:24 PM (18 years ago)
- Children:
- f2ce71c
- Parents:
- 36f85c
- git-author:
- Frederik Heber <heber@…> (04/18/08 15:25:05)
- git-committer:
- Frederik Heber <heber@…> (04/21/08 14:19:24)
- File:
-
- 1 edited
-
pcp/src/errors.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
pcp/src/errors.c
r36f85c re6a122 31 31 * \param *SpecialData is a typeless pointer on special data for error treatment, here detailed error message. 32 32 */ 33 void Error(enum Errors error, const void *SpecialData) 33 void Error_in(enum Errors error, const void *SpecialData, 34 const char *file, const int line) 34 35 { 35 36 const char *const error_msg[] = { 36 37 "SomeError", 37 "FileOpenParams\nUnable to open parameter file ",38 "FileOpenParams\nUnable to open parameter file\n", 38 39 "InitReading\n", 39 "MallocError\nUnable to allocate memory! ",40 "MallocError\nUnable to allocate memory!\n", 40 41 }; 41 42 int mytid; 42 43 MPI_Comm_rank(MPI_COMM_WORLD, &mytid); 43 44 fprintf(stderr, "\nProcess %i: ", mytid); 44 fprintf(stderr, "It has occured an error (%i): %s\n", error, error_msg[error]); 45 fprintf(stderr, "Error in file %s, line %d (%i): %s - ", 46 file, line, (int)error, error_msg[error]); 45 47 switch (error) { 46 48 case InitReading:
Note:
See TracChangeset
for help on using the changeset viewer.
