BetaTrader
A HFT Eco-System
Loading...
Searching...
No Matches
errors Namespace Reference

This file defines all runbook error codes as objects. More...

Variables

constexpr runbook::ErrorDefinition EDATA1
 
constexpr runbook::ErrorDefinition EDATA10
 
constexpr runbook::ErrorDefinition EDATA11
 
constexpr runbook::ErrorDefinition EDATA12
 
constexpr runbook::ErrorDefinition EDATA2
 
constexpr runbook::ErrorDefinition EDATA3
 
constexpr runbook::ErrorDefinition EDATA4
 
constexpr runbook::ErrorDefinition EDATA5
 
constexpr runbook::ErrorDefinition EDATA6
 
constexpr runbook::ErrorDefinition EDATA7
 
constexpr runbook::ErrorDefinition EDATA8
 
constexpr runbook::ErrorDefinition EDATA9
 
constexpr runbook::ErrorDefinition EFIX1
 Error definition for when the FIX Server fails to start.
 
constexpr runbook::ErrorDefinition EFIX2
 Error definition for when an incoming FIX message cannot be processed.
 
constexpr runbook::ErrorDefinition EFIX3
 Error definition for when a FIX session disconnects with an error.
 
constexpr runbook::ErrorDefinition ETRADE1
 
constexpr runbook::ErrorDefinition ETRADE10
 
constexpr runbook::ErrorDefinition ETRADE11
 
constexpr runbook::ErrorDefinition ETRADE2
 
constexpr runbook::ErrorDefinition ETRADE3
 
constexpr runbook::ErrorDefinition ETRADE4
 
constexpr runbook::ErrorDefinition ETRADE5
 
constexpr runbook::ErrorDefinition ETRADE6
 
constexpr runbook::ErrorDefinition ETRADE7
 
constexpr runbook::ErrorDefinition ETRADE8
 
constexpr runbook::ErrorDefinition ETRADE9
 

Detailed Description

This file defines all runbook error codes as objects.

Include this header in any .cpp file that needs to log a runbook error. The use of 'inline constexpr' (C++17) ensures that these objects are defined once, at compile time, and are available to be passed directly to the logger.

This new structure is fully type-safe and avoids all linker and runtime "Unknown Error" issues.

Variable Documentation

◆ EDATA1

constexpr runbook::ErrorDefinition errors::EDATA1
inlineconstexpr
Initial value:
{
"EDATA1", "Error in Async DB worker",
"Check the query executed, this might be an SQL or Worker error"}

◆ EDATA10

constexpr runbook::ErrorDefinition errors::EDATA10
inlineconstexpr
Initial value:
{
"EDATA10", "Failed to load orders from the 'Order' database table.",
"Check the underlying database connection and the SQL syntax for "
"the order table creation query."}

◆ EDATA11

constexpr runbook::ErrorDefinition errors::EDATA11
inlineconstexpr
Initial value:
{
"EDATA11",
"Failed to remove an order from the 'Order' database table.",
"Check the underlying database connection and the SQL syntax for "
"the order table creation query."}

◆ EDATA12

constexpr runbook::ErrorDefinition errors::EDATA12
inlineconstexpr
Initial value:
{
"EDATA12",
"Failed to update an order in the 'Order' database table.",
"Check the underlying database connection and the SQL syntax for "
"the order table creation query."}

◆ EDATA2

constexpr runbook::ErrorDefinition errors::EDATA2
inlineconstexpr
Initial value:
{
"EDATA2", "Failed to create the 'TradeID' database table.",
"Check the underlying database connection and the SQL syntax for "
"the trade ID table creation query."}

◆ EDATA3

constexpr runbook::ErrorDefinition errors::EDATA3
inlineconstexpr
Initial value:
{
"EDATA3",
"Failed to retrieve the current TradeID from the database.",
"Verify the database connection is active and the SQL query for "
"retrieving the TradeID is correct. This may indicate data "
"corruption."}

◆ EDATA4

constexpr runbook::ErrorDefinition errors::EDATA4
inlineconstexpr
Initial value:
{
"EDATA4", "Attempt to update the TradeID in the database failed.",
"Confirm that the process has write permissions to the database "
"file/server and the update query syntax is valid."}

◆ EDATA5

constexpr runbook::ErrorDefinition errors::EDATA5
inlineconstexpr
Initial value:
{
"EDATA5", "Failed to truncate or reset the TradeID table.",
"Check database permissions for TRUNCATE/DELETE operations and "
"verify the query execution environment."}

◆ EDATA6

constexpr runbook::ErrorDefinition errors::EDATA6
inlineconstexpr
Initial value:
{
"EDATA6", "Failed to create the 'Trade' database table.",
"Check the underlying database connection and the SQL syntax for "
"the trade table creation query."}

◆ EDATA7

constexpr runbook::ErrorDefinition errors::EDATA7
inlineconstexpr
Initial value:
{
"EDATA7", "Failed to add a trade in the 'Trade' database table.",
"Check the underlying database connection and the SQL syntax for "
"the trade table creation query."}

◆ EDATA8

constexpr runbook::ErrorDefinition errors::EDATA8
inlineconstexpr
Initial value:
{
"EDATA8", "Failed to create the 'Order' database table.",
"Check the underlying database connection and the SQL syntax for "
"the order table creation query."}

◆ EDATA9

constexpr runbook::ErrorDefinition errors::EDATA9
inlineconstexpr
Initial value:
{
"EDATA9", "Failed to save an order in the 'Order' database table.",
"Check the underlying database connection and the SQL syntax for "
"the order table creation query."}

◆ EFIX1

constexpr runbook::ErrorDefinition errors::EFIX1
inlineconstexpr
Initial value:
{
"EFIX1", "FIX Server failed to start.",
"Check if the port is already in use or if there are issues with network permissions."}

Error definition for when the FIX Server fails to start.

◆ EFIX2

constexpr runbook::ErrorDefinition errors::EFIX2
inlineconstexpr
Initial value:
{
"EFIX2", "Failed to process incoming FIX message.",
"The message may be malformed or the checksum validation failed. Check the raw message data."}

Error definition for when an incoming FIX message cannot be processed.

◆ EFIX3

constexpr runbook::ErrorDefinition errors::EFIX3
inlineconstexpr
Initial value:
{
"EFIX3", "Session disconnected with an error.",
"This could be due to a network issue or an ungraceful disconnect from the client."}

Error definition for when a FIX session disconnects with an error.

◆ ETRADE1

constexpr runbook::ErrorDefinition errors::ETRADE1
inlineconstexpr
Initial value:
{
"ETRADE1", "Unknown command type detected",
"An Unknown or un processable command type was passed with the "
"command,"
" view the command and/or change the type"}

◆ ETRADE10

constexpr runbook::ErrorDefinition errors::ETRADE10
inlineconstexpr
Initial value:
{
"ETRADE10", "Risk check failed",
"The order has been rejected by the risk manager."}

◆ ETRADE11

constexpr runbook::ErrorDefinition errors::ETRADE11
inlineconstexpr
Initial value:
{
"ETRADE11", "Command queue full",
"The command queue for the partition is full, commands might be "
"dropped."}

◆ ETRADE2

constexpr runbook::ErrorDefinition errors::ETRADE2
inlineconstexpr
Initial value:
{
"ETRADE2",
"Command did not have Order inside it, expected an order for the "
"given type of command",
"Either change the type of command or else, pass in an order for "
"the command"}

◆ ETRADE3

constexpr runbook::ErrorDefinition errors::ETRADE3
inlineconstexpr
Initial value:
{
"ETRADE3", "Unknown command type",
"The command type is not supported, check if the implementation of "
"virtual functions."}

◆ ETRADE4

constexpr runbook::ErrorDefinition errors::ETRADE4
inlineconstexpr
Initial value:
{
"ETRADE4", "Incoming Order is null",
"Matcher received a null pointer for incoming order."}

◆ ETRADE5

constexpr runbook::ErrorDefinition errors::ETRADE5
inlineconstexpr
Initial value:
{
"ETRADE5", "Order not found", "Order not found in the order book."}

◆ ETRADE6

constexpr runbook::ErrorDefinition errors::ETRADE6
inlineconstexpr
Initial value:
{
"ETRADE6", "Order not found",
"Order not found in the order manager."}

◆ ETRADE7

constexpr runbook::ErrorDefinition errors::ETRADE7
inlineconstexpr
Initial value:
{
"ETRADE7", "Invalid NewOrder cast",
"Failed to cast Command to NewOrder."}

◆ ETRADE8

constexpr runbook::ErrorDefinition errors::ETRADE8
inlineconstexpr
Initial value:
{
"ETRADE8", "Invalid ModifyOrder cast",
"Failed to cast Command to ModifyOrder."}

◆ ETRADE9

constexpr runbook::ErrorDefinition errors::ETRADE9
inlineconstexpr
Initial value:
{
"ETRADE9", "Invalid CancelOrder cast",
"Failed to cast Command to CancelOrder."}