wiRedPanda
Logic Circuit Simulator
Loading...
Searching...
No Matches
JsonRpcError.h
Go to the documentation of this file.
1// Copyright 2015 - 2026, GIBIS-UNIFESP and the wiRedPanda contributors
2// SPDX-License-Identifier: GPL-3.0-or-later
3
4#pragma once
5
15namespace JsonRpcError {
16
17// JSON-RPC 2.0 pre-defined error codes
18constexpr int ParseError = -32700;
19constexpr int InvalidRequest = -32600;
20constexpr int MethodNotFound = -32601;
21constexpr int InvalidParams = -32602;
22constexpr int InternalError = -32603;
23
24// Application-defined codes (spec reserves -32000..-32099 for the implementation)
25constexpr int SceneNotAvailable = -32000;
26constexpr int ElementNotFound = -32001;
27constexpr int ConnectionFailed = -32002;
28constexpr int FileError = -32003;
29constexpr int SimulationError = -32004;
30constexpr int ValidationError = -32005;
31constexpr int IcError = -32006;
32constexpr int PortNotFound = -32007;
33constexpr int OperationFailed = -32008;
34
35} // namespace JsonRpcError
constexpr int ParseError
Invalid JSON received by the server.
constexpr int SceneNotAvailable
No active circuit scene to operate on.
constexpr int SimulationError
Simulation control / waveform failure.
constexpr int PortNotFound
Port lookup by index or label did not match.
constexpr int MethodNotFound
The requested method does not exist or is unavailable.
constexpr int OperationFailed
Generic Qt API / handler operation failure (catch-all for tryCommand).
constexpr int InvalidRequest
The JSON sent is not a valid Request object.
constexpr int InternalError
Internal JSON-RPC error (last-resort).
constexpr int ConnectionFailed
Connect/disconnect or port-mismatch failure.
constexpr int ElementNotFound
Referenced element id does not exist in the scene.
constexpr int FileError
File save/load/path error.
constexpr int ValidationError
Semantic validation failure (e.g. port index out of range, enum value not allowed).
constexpr int InvalidParams
Invalid method parameters (missing required, wrong type, etc.).
constexpr int IcError
IC create / instantiate / embed / extract failure.