Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
1450e45d
Commit
1450e45d
authored
Jan 23, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Main, db/Glue: improve error messages
parent
ec8cba36
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
Main.cxx
src/Main.cxx
+5
-1
DatabaseGlue.cxx
src/db/DatabaseGlue.cxx
+6
-1
No files found.
src/Main.cxx
View file @
1450e45d
...
...
@@ -203,7 +203,11 @@ glue_db_init_and_load(void)
"because the database does not need it"
);
}
instance
->
database
->
Open
();
try
{
instance
->
database
->
Open
();
}
catch
(...)
{
std
::
throw_with_nested
(
std
::
runtime_error
(
"Failed to open database plugin"
));
}
if
(
!
instance
->
database
->
IsPlugin
(
simple_db_plugin
))
return
true
;
...
...
src/db/DatabaseGlue.cxx
View file @
1450e45d
...
...
@@ -37,5 +37,10 @@ DatabaseGlobalInit(EventLoop &loop, DatabaseListener &listener,
throw
FormatRuntimeError
(
"No such database plugin: %s"
,
plugin_name
);
return
plugin
->
create
(
loop
,
listener
,
block
);
try
{
return
plugin
->
create
(
loop
,
listener
,
block
);
}
catch
(...)
{
std
::
throw_with_nested
(
FormatRuntimeError
(
"Failed to initialize database plugin '%s'"
,
plugin_name
));
}
}
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