fix(github): Handle curl exceptions and bad status codes ()

If any error occurs, a warning is logged and -1 
is displayed as the number of notifications
This commit is contained in:
Kókai Péter 2017-11-07 23:29:44 +01:00 committed by Patrick Ziegler
parent dc0edfb994
commit 3f9f2dc37f
2 changed files with 35 additions and 15 deletions
include/modules

View file

@ -1,7 +1,7 @@
#pragma once
#include "settings.hpp"
#include "modules/meta/timer_module.hpp"
#include "settings.hpp"
#include "utils/http.hpp"
POLYBAR_NS
@ -18,6 +18,9 @@ namespace modules {
bool build(builder* builder, const string& tag) const;
private:
void update_label(const int);
int get_number_of_notification();
string request();
static constexpr auto TAG_LABEL = "<label>";
label_t m_label{};