Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Nils-Arne Dreier
dune-common
Commits
cf8cb82a
Commit
cf8cb82a
authored
16 years ago
by
Martin Nolte
Browse files
Options
Downloads
Patches
Plain Diff
allow output of const exceptions
[[Imported from SVN: r5235]]
parent
03bc25ba
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
common/exceptions.hh
+11
-5
11 additions, 5 deletions
common/exceptions.hh
with
11 additions
and
5 deletions
common/exceptions.hh
+
11
−
5
View file @
cf8cb82a
...
...
@@ -87,18 +87,24 @@ namespace Dune {
*/
class
Exception
{
public:
void
message
(
std
::
string
message
);
//!< store string in internal message buffer
std
::
string
what
()
{
return
_message
;
};
//!< output internal message buffer
void
message
(
const
std
::
string
&
message
);
//!< store string in internal message buffer
const
std
::
string
&
what
()
const
;
//!< output internal message buffer
private:
std
::
string
_message
;
};
inline
void
Exception
::
message
(
std
::
string
message
)
{
inline
void
Exception
::
message
(
const
std
::
string
&
message
)
{
_message
=
message
;
}
inline
std
::
ostream
&
operator
<<
(
std
::
ostream
&
stream
,
Exception
&
e
)
{
inline
const
std
::
string
&
Exception
::
what
()
const
{
return
_message
;
}
inline
std
::
ostream
&
operator
<<
(
std
::
ostream
&
stream
,
const
Exception
&
e
)
{
return
stream
<<
e
.
what
();
}
...
...
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