FastLED 3.9.15
Loading...
Searching...
No Matches

◆ reportError() [1/2]

void fl::Remote::reportError ( const fl::json & data)

Send an error notification with structured data Format: {"jsonrpc":"2.0","method":"__error","params":<data>}.

Definition at line 121 of file remote.cpp.hpp.

121 {
122 if (!mResponseSink) {
123 return;
124 }
125 fl::json notification = fl::json::object();
126 notification.set("jsonrpc", "2.0");
127 notification.set("method", "__error");
128 notification.set("params", data);
129 mResponseSink(notification);
130}
ResponseSink mResponseSink
Definition server.h:89
void set(const fl::string &key, const json &value) FL_NOEXCEPT
Definition json.h:701
static json object() FL_NOEXCEPT
Definition json.h:692

References fl::Server::mResponseSink, fl::json::object(), and fl::json::set().

+ Here is the call graph for this function: