MCPcopy Create free account
hub / github.com/ElementsProject/lightning / custom_error

Method custom_error

plugins/lsps-plugin/src/proto/jsonrpc.rs:361–367  ·  view source on GitHub ↗

Reserved for implementation-defined server-errors.

(code: i64, message: T)

Source from the content-addressed store, hash-verified

359impl RpcError {
360 /// Reserved for implementation-defined server-errors.
361 pub fn custom_error<T: core::fmt::Display>(code: i64, message: T) -> Self {
362 RpcError {
363 code,
364 message: message.to_string(),
365 data: None,
366 }
367 }
368
369 /// Reserved for implementation-defined server-errors.
370 pub fn custom_error_with_data<T: core::fmt::Display>(

Callers

nothing calls this directly

Calls 1

to_stringMethod · 0.45

Tested by

no test coverage detected