Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Plumed AlphaFold
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Kurečka
Plumed AlphaFold
Commits
87a07e32
There was an error fetching the commit references. Please try again later.
Commit
87a07e32
authored
6 years ago
by
Giovanni Bussi
Browse files
Options
Downloads
Patches
Plain Diff
Small fix in Exception to show function name
parent
be9e2028
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/tools/Exception.h
+6
-3
6 additions, 3 deletions
src/tools/Exception.h
with
6 additions
and
3 deletions
src/tools/Exception.h
+
6
−
3
View file @
87a07e32
...
@@ -256,9 +256,12 @@ public:
...
@@ -256,9 +256,12 @@ public:
}
}
};
};
#ifdef __GNUG__
// With GNU compiler, we can use __PRETTY_FUNCTION__ to get the function name
// With GNU compiler, we can use __PRETTY_FUNCTION__ to get the function name
#if !defined(__PRETTY_FUNCTION__)
#define __PLUMED_FUNCNAME __PRETTY_FUNCTION__
#define __PRETTY_FUNCTION__ ""
#else
// Otherwise, we use the standard C++11 variable
#define __PLUMED_FUNCNAME __func__
#endif
#endif
/// \relates PLMD::Exception
/// \relates PLMD::Exception
...
@@ -266,7 +269,7 @@ public:
...
@@ -266,7 +269,7 @@ public:
/// Might be useful if we want to use derived exceptions that could
/// Might be useful if we want to use derived exceptions that could
/// be thrown using `throw DerivedException()<<plumed_here<<" "<<other stuff"`.
/// be thrown using `throw DerivedException()<<plumed_here<<" "<<other stuff"`.
/// It is used in the macros below to throw PLMD::Exception.
/// It is used in the macros below to throw PLMD::Exception.
#define plumed_here PLMD::Exception::Location(__FILE__,__LINE__,__P
RETTY_FUNCTION__
)
#define plumed_here PLMD::Exception::Location(__FILE__,__LINE__,__P
LUMED_FUNCNAME
)
/// \relates PLMD::Exception
/// \relates PLMD::Exception
/// Throw an exception with information about the position in the file.
/// Throw an exception with information about the position in the file.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment