Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
5847ffa0
Commit
5847ffa0
authored
Aug 11, 2004
by
lw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check duplicate name at object creation
parent
96cb5bc9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
6 deletions
+34
-6
wb/lib/wb/src/wb_vrepdb.cpp
wb/lib/wb/src/wb_vrepdb.cpp
+34
-6
No files found.
wb/lib/wb/src/wb_vrepdb.cpp
View file @
5847ffa0
...
...
@@ -328,11 +328,18 @@ wb_orep *wb_vrepdb::copyObject(pwr_tStatus *sts, const wb_orep *orep, wb_destina
txn
->
commit
(
0
);
return
new
(
this
)
wb_orepdb
(
&
o
.
m_o
);
}
catch
(
wb_error
&
e
)
{
txn
->
abort
();
if
(
p
)
free
(
p
);
*
sts
=
e
.
sts
();
return
0
;
}
catch
(
DbException
&
e
)
{
txn
->
abort
();
if
(
p
)
free
(
p
);
*
sts
=
2
;
//LDH__DB_
ERROR;
*
sts
=
LDH__DB
ERROR
;
return
0
;
}
}
...
...
@@ -409,11 +416,18 @@ wb_orep* wb_vrepdb::createObject(pwr_tStatus *sts, wb_cdef cdef, wb_destination
return
new
(
this
)
wb_orepdb
(
&
o
.
m_o
);
}
catch
(
wb_error
&
e
)
{
txn
->
abort
();
if
(
p
)
free
(
p
);
//*sts = e.sts();
throw
e
;
}
catch
(
DbException
&
e
)
{
txn
->
abort
();
if
(
p
)
free
(
p
);
*
sts
=
2
;
*
sts
=
LDH__DBERROR
;
return
0
;
}
}
...
...
@@ -443,9 +457,14 @@ bool wb_vrepdb::deleteObject(pwr_tStatus *sts, wb_orep *orp)
txn
->
commit
(
0
);
return
true
;
}
catch
(
wb_error
&
e
)
{
txn
->
abort
();
*
sts
=
e
.
sts
();
return
0
;
}
catch
(
DbException
&
e
)
{
txn
->
abort
();
*
sts
=
2
;
// LDH__DB_ERROR
*
sts
=
LDH__DBERROR
;
return
false
;
}
}
...
...
@@ -512,7 +531,7 @@ bool wb_vrepdb::deleteFamily(pwr_tStatus *sts, wb_orep *orp)
catch
(
DbException
&
e
)
{
printf
(
"wb_vrepdb::deleteFamily failure, %s
\n
"
,
e
.
what
());
txn
->
abort
();
*
sts
=
2
;
// LDH__DB_ERROR
*
sts
=
LDH__DBERROR
;
return
false
;
}
}
...
...
@@ -546,8 +565,14 @@ bool wb_vrepdb::moveObject(pwr_tStatus *sts, wb_orep *orp, wb_destination &d)
txn
->
commit
(
0
);
}
catch
(
wb_error
&
e
)
{
txn
->
abort
();
*
sts
=
e
.
sts
();
return
0
;
}
catch
(
DbException
&
e
)
{
txn
->
abort
();
*
sts
=
LDH__DBERROR
;
}
return
true
;
...
...
@@ -586,7 +611,7 @@ bool wb_vrepdb::renameObject(pwr_tStatus *sts, wb_orep *orp, wb_name &name)
txn
->
abort
();
printf
(
"wb_vrepdb::renameObject, exception %s
\n
"
,
e
.
what
());
m_ohead
.
clear
();
*
sts
=
2
;
*
sts
=
LDH__DBERROR
;
return
false
;
}
}
...
...
@@ -1103,8 +1128,11 @@ void wb_vrepdb::adopt(wb_db_txn *txn, wb_db_ohead &o, wb_destination &dest)
wb_db_name
n
(
m_db
,
o
.
oid
(),
o
.
poid
(),
o
.
normname
());
rc
=
n
.
put
(
txn
);
if
(
rc
)
if
(
rc
)
{
printf
(
"wb_vrepdb::adopt, n.put rc %d
\n
"
,
rc
);
throw
wb_error
(
LDH__NAMALREXI
);
}
}
void
wb_vrepdb
::
unadopt
(
wb_db_txn
*
txn
,
wb_db_ohead
&
o
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment