fix(github): Handle curl exceptions and bad status codes (#811)
If any error occurs, a warning is logged and -1 is displayed as the number of notifications
This commit is contained in:
parent
dc0edfb994
commit
3f9f2dc37f
2 changed files with 35 additions and 15 deletions
include/modules
|
@ -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{};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue