convert Error class to accept 'const std::string &' instead of 'const char *'
This commit is contained in:
@ -25,7 +25,7 @@ class LAMMPSException : public std::exception
|
||||
public:
|
||||
std::string message;
|
||||
|
||||
LAMMPSException(std::string msg) : message(msg) {
|
||||
LAMMPSException(const std::string &msg) : message(msg) {
|
||||
}
|
||||
|
||||
~LAMMPSException() throw() {
|
||||
@ -40,7 +40,7 @@ class LAMMPSAbortException : public LAMMPSException {
|
||||
public:
|
||||
MPI_Comm universe;
|
||||
|
||||
LAMMPSAbortException(std::string msg, MPI_Comm universe) :
|
||||
LAMMPSAbortException(const std::string &msg, MPI_Comm universe) :
|
||||
LAMMPSException(msg),
|
||||
universe(universe)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user