Meaningful error codes instead of plain -1

This commit is contained in:
Pavel Kirienko
2014-03-28 19:21:08 +04:00
parent 4886e2194f
commit ae63ad5db5
34 changed files with 112 additions and 73 deletions
+29
View File
@@ -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
};
}