neighbor/Plugin: migrate from class Error to C++ exceptions
This commit is contained in:
@@ -24,7 +24,6 @@
|
||||
#include "neighbor/Glue.hxx"
|
||||
#include "fs/Path.hxx"
|
||||
#include "event/Loop.hxx"
|
||||
#include "util/Error.hxx"
|
||||
#include "Log.hxx"
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -56,8 +55,6 @@ try {
|
||||
|
||||
/* read configuration file (mpd.conf) */
|
||||
|
||||
Error error;
|
||||
|
||||
config_global_init();
|
||||
ReadConfigFile(config_path);
|
||||
|
||||
@@ -69,17 +66,15 @@ try {
|
||||
|
||||
MyNeighborListener listener;
|
||||
NeighborGlue neighbor;
|
||||
if (!neighbor.Init(loop, listener, error) || !neighbor.Open(error)) {
|
||||
LogError(error);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
neighbor.Init(loop, listener);
|
||||
neighbor.Open();
|
||||
|
||||
/* run */
|
||||
|
||||
loop.Run();
|
||||
neighbor.Close();
|
||||
return EXIT_SUCCESS;
|
||||
} catch (const std::exception &e) {
|
||||
} catch (const std::exception &e) {
|
||||
LogError(e);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user