Changeset 9388


Ignore:
Timestamp:
08/23/11 11:46:03 (14 years ago)
Author:
Mathieu Morlighem
Message:

Formatted Error exceptions for matlab

Location:
issm/trunk/src/c
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/IoModel.cpp

    r9386 r9388  
    508508                /*}}}*/
    509509
     510                /*Add to this->data: */
    510511                this->FetchData(&matrix,&M,&N,dataenum);
    511                 if(M*N==0){
    512                         _error_("Cannot add %s to Iomodel->data because the matrix found is empty",EnumToStringx(dataenum));
    513                 }
    514 
    515                 /*Add to this->data: */
    516512                this->data[dataenum]=matrix;
    517513        }
  • issm/trunk/src/c/shared/Exceptions/Exceptions.cpp

    r9320 r9388  
    1010#include "../shared.h"
    1111#include "../../include/include.h"
     12#ifdef _SERIAL_
     13#include "mex.h"
     14#endif
    1215
    1316ErrorException::ErrorException(const string &what_arg){
     
    4548                        printf("[%i] %s error message: %s\n\n",my_rank,function_name.c_str(),what());
    4649                #else
    47                         printf("\n??? Error using ==> %s at %i\n",file_name.c_str(),file_line);
    48                         printf("%s error message: %s\n\n",function_name.c_str(),what());
     50                        mexErrMsgTxt(exprintf("\n??? Error using ==> %s at %i\n%s error message: %s\n",
     51                                                        file_name.c_str(),file_line,function_name.c_str(),what()));
    4952                #endif
    5053        }
Note: See TracChangeset for help on using the changeset viewer.