Skip to content

Commit

Permalink
Update errors2.h
Browse files Browse the repository at this point in the history
  • Loading branch information
jpkneller authored Jul 2, 2024
1 parent 757feb0 commit aa00bb4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/BEMEWS/_ext/mstl/errors2.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class BASIC_ERROR : public std::exception
BASIC_ERROR(const std::string &WHICH,const std::string &WHO,const int &WHERE)
: std::exception(){ function=ThrownIn+WHICH;
object=InObject+WHO;
char buffer[7]; sprintf(buffer,"%d",WHERE);
char buffer[7]; snprintf(buffer,"%d",WHERE);
line=AtLine+std::string(buffer);
}

Expand All @@ -114,8 +114,8 @@ class BASIC_ERROR : public std::exception

void ChangeWhere(const std::string &WHERE){ line=AtLine+WHERE;}
void ChangeLine(const std::string &WHERE){ line=AtLine+WHERE;}
void ChangeWhere(const int &WHERE){ char buffer[7]; sprintf(buffer,"%d",WHERE); line=AtLine+std::string(buffer);}
void ChangeLine(const int &WHERE){ char buffer[7]; sprintf(buffer,"%d",WHERE); line=AtLine+std::string(buffer);}
void ChangeWhere(const int &WHERE){ char buffer[7]; snprintf(buffer,"%d",WHERE); line=AtLine+std::string(buffer);}
void ChangeLine(const int &WHERE){ char buffer[7]; snprintf(buffer,"%d",WHERE); line=AtLine+std::string(buffer);}

void Change(const std::string &WHICH=Unknown,const std::string &WHO=Unknown,const std::string &WHERE=Unknown)
{ function=( WHICH==Unknown ? function : ThrownIn+WHICH );
Expand All @@ -125,7 +125,7 @@ class BASIC_ERROR : public std::exception
void Change(const std::string &WHICH,const std::string &WHO,const int &WHERE)
{ function=ThrownIn+WHICH;
object=InObject+WHO;
char buffer[7]; sprintf(buffer,"%d",WHERE);
char buffer[7]; snprintf(buffer,"%d",WHERE);
line=AtLine+std::string(buffer);
}

Expand Down

0 comments on commit aa00bb4

Please sign in to comment.