Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
senf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
wiback
senf
Commits
a012e8fd
Commit
a012e8fd
authored
18 years ago
by
g0dil
Browse files
Options
Downloads
Patches
Plain Diff
Add method argument to SystemException
parent
05901d62
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Utils/Exception.cc
+11
-1
11 additions, 1 deletion
Utils/Exception.cc
Utils/Exception.hh
+11
-1
11 additions, 1 deletion
Utils/Exception.hh
with
22 additions
and
2 deletions
Utils/Exception.cc
+
11
−
1
View file @
a012e8fd
...
...
@@ -27,14 +27,24 @@
// Custom includes
#include
<cstring>
#include
<sstream>
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
prefix_
void
satcom
::
lib
::
SystemException
::
init
()
{
std
::
stringstream
s
;
if
(
where
)
s
<<
where
<<
": "
;
s
<<
"("
<<
err
<<
") "
<<
std
::
strerror
(
err
);
buffer_
=
s
.
str
();
}
prefix_
char
const
*
satcom
::
lib
::
SystemException
::
what
()
const
throw
()
{
return
std
::
strerror
(
this
->
err
);
return
buffer_
.
c_str
(
);
}
///////////////////////////////cc.e////////////////////////////////////////
...
...
This diff is collapsed.
Click to expand it.
Utils/Exception.hh
+
11
−
1
View file @
a012e8fd
...
...
@@ -25,6 +25,7 @@
// Custom includes
#include
<exception>
#include
<string>
//#include "Exception.mpp"
///////////////////////////////hh.p////////////////////////////////////////
...
...
@@ -34,9 +35,18 @@ namespace lib {
struct
SystemException
:
public
std
::
exception
{
SystemException
(
int
err_
)
:
err
(
err_
)
{};
explicit
SystemException
(
int
err_
)
:
where
(
0
),
err
(
err_
)
{
init
();
}
SystemException
(
char
const
*
where_
,
int
err_
)
:
where
(
where_
),
err
(
err_
)
{
init
();
}
virtual
char
const
*
what
()
const
throw
();
char
const
*
where
;
int
err
;
virtual
~
SystemException
()
throw
()
{}
private
:
void
init
();
std
::
string
buffer_
;
};
}}
...
...
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