Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-cpplib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
caosdb
Software
caosdb-cpplib
Commits
e810278b
Commit
e810278b
authored
3 years ago
by
florian
Browse files
Options
Downloads
Patches
Plain Diff
ENH: Add status code for wrong void pointer assignment
parent
473e5532
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!12
F consolidation
,
!9
Draft: API: remove UniqueResult, lower-case at, size for ResultSet
,
!8
ENH: Add retrieval and queries to Extern C interface
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/caosdb/status_code.h
+1
-0
1 addition, 0 deletions
include/caosdb/status_code.h
src/caosdb/transaction.cpp
+4
-1
4 additions, 1 deletion
src/caosdb/transaction.cpp
with
5 additions
and
1 deletion
include/caosdb/status_code.h
+
1
−
0
View file @
e810278b
...
...
@@ -52,6 +52,7 @@ enum StatusCode {
TRANSACTION_TYPE_ERROR
=
26
,
UNSUPPORTED_FEATURE
=
27
,
ORIGINAL_ENTITY_MISSING_ID
=
28
,
EXTERN_C_ASSIGNMENT_ERROR
=
29
,
};
auto
get_status_description
(
int
code
)
->
const
std
::
string
&
;
...
...
This diff is collapsed.
Click to expand it.
src/caosdb/transaction.cpp
+
4
−
1
View file @
e810278b
...
...
@@ -80,7 +80,10 @@ auto get_status_description(int code) -> const std::string & {
"an id. This is the case when you did not retrieve it before applying any "
"changes and instantiated the Entity class explicitely."
},
{
StatusCode
::
UNSUPPORTED_FEATURE
,
"This feature is not available in the this client implementation."
}};
"This feature is not available in the this client implementation."
},
{
StatusCode
::
EXTERN_C_ASSIGNMENT_ERROR
,
"You tried to assign a new object to the wrapped void pointer. You have "
"to delete the old pointee first."
}};
try
{
return
descriptions
.
at
(
code
);
}
catch
(
const
std
::
out_of_range
&
exc
)
{
...
...
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