aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorJokler <jokler.contact@gmail.com>2017-10-17 01:04:41 +0200
committerJokler <jokler.contact@gmail.com>2017-10-17 01:10:59 +0200
commit292805ff70b6b39adfaeb0ffafed8626169b7bee (patch)
tree2d93d040e302be263fbc5a253d0151f4c9587f68 /src/lib.rs
parent513aa57334536dabc7a22856bbb99bc92ff1038f (diff)
downloadfrippy-292805ff70b6b39adfaeb0ffafed8626169b7bee.tar.gz
frippy-292805ff70b6b39adfaeb0ffafed8626169b7bee.zip
Display possible error when trying to create a connection
This can still panic but that should be fixed in the next version of the irc library.
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 11490d4..f8534be 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -94,7 +94,13 @@ pub fn run() {
// Open a connection and add work for each config
for config in configs {
- let fut = IrcServer::new_future(reactor.handle(), &config).unwrap();
+ let fut = match IrcServer::new_future(reactor.handle(), &config) {
+ Ok(v) => v,
+ Err(e) => {
+ error!("Failed to connect: {}", e);
+ return;
+ }
+ };
let server = match reactor.run(fut) {
Ok(v) => {