mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 06:53:34 +08:00
Meaningful error codes instead of plain -1
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (C) 2014 Pavel Kirienko <pavel.kirienko@gmail.com>
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace uavcan
|
||||
{
|
||||
/**
|
||||
* Common error codes.
|
||||
* Functions that return signed integers may also return inverted error codes,
|
||||
* i.e. returned value should be inverted back to get the actual error code.
|
||||
*/
|
||||
enum
|
||||
{
|
||||
ErrOk,
|
||||
ErrFailure,
|
||||
ErrInvalidParam,
|
||||
ErrMemory,
|
||||
ErrDriver,
|
||||
ErrUnknownDataType,
|
||||
ErrInvalidMarshalData,
|
||||
ErrInvalidTransferListener,
|
||||
ErrNotInited,
|
||||
ErrRecursiveCall,
|
||||
ErrLogic
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user