FastLED 3.10.8
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 141 of file remote.cpp.hpp.

141 {
142 if (!mResponseSink) {
143 return;
144 }
145 fl::json notification = fl::json::object();
146 notification.set("jsonrpc", "2.0");
147 notification.set("method", "__error");
148 notification.set("params", data);
149 mResponseSink(notification);
150}
ResponseSink mResponseSink
Definition server.h:99
void set(const fl::string &key, const json &value) FL_NO_EXCEPT
Definition json.h:866
static json object() FL_NO_EXCEPT
Definition json.h:857

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

+ Here is the call graph for this function: