mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 06:43:34 +08:00
Shorter error strings - saves ~200 bytes
This commit is contained in:
@@ -543,7 +543,7 @@ public:
|
||||
Base::clear();
|
||||
if (ch == NULL)
|
||||
{
|
||||
handleFatalError("Null pointer in Array<>::operator=(const char*)");
|
||||
handleFatalError("Array::operator=(const char*)");
|
||||
}
|
||||
while (*ch)
|
||||
{
|
||||
@@ -558,7 +558,7 @@ public:
|
||||
StaticAssert<IsDynamic>::check();
|
||||
if (ch == NULL)
|
||||
{
|
||||
handleFatalError("Null pointer in Array<>::operator+=(const char*)");
|
||||
handleFatalError("Array::operator+=(const char*)");
|
||||
}
|
||||
while (*ch)
|
||||
{
|
||||
|
||||
@@ -124,7 +124,7 @@ struct UAVCAN_EXPORT DefaultDataTypeRegistrator
|
||||
|
||||
if (res != GlobalDataTypeRegistry::RegistResultOk)
|
||||
{
|
||||
handleFatalError("Type registration failed");
|
||||
handleFatalError("Type reg failed");
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -164,7 +164,8 @@ GlobalDataTypeRegistry::RegistResult GlobalDataTypeRegistry::regist(DataTypeID i
|
||||
return remove_res;
|
||||
}
|
||||
}
|
||||
new (storage.buffer) Entry(DataTypeKind(Type::DataTypeKind), id, Type::getDataTypeSignature(), Type::getDataTypeFullName());
|
||||
new (storage.buffer) Entry(DataTypeKind(Type::DataTypeKind), id, Type::getDataTypeSignature(),
|
||||
Type::getDataTypeFullName());
|
||||
{
|
||||
const RegistResult remove_res = remove(entry);
|
||||
if (remove_res != RegistResultOk)
|
||||
|
||||
@@ -187,7 +187,7 @@ void ServiceClient<DataType_, Callback_>::invokeCallback(ServiceCallResultType&
|
||||
}
|
||||
else
|
||||
{
|
||||
handleFatalError("Invalid caller callback");
|
||||
handleFatalError("Srv client clbk");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ private:
|
||||
}
|
||||
else
|
||||
{
|
||||
handleFatalError("Invalid service server callback");
|
||||
handleFatalError("Srv serv clbk");
|
||||
}
|
||||
|
||||
const int res = publisher_.publish(response_, TransferTypeServiceResponse, request.getSrcNodeID(),
|
||||
|
||||
@@ -50,7 +50,7 @@ private:
|
||||
}
|
||||
else
|
||||
{
|
||||
handleFatalError("Invalid subscriber callback");
|
||||
handleFatalError("Sub clbk");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ class UAVCAN_EXPORT LazyConstructor
|
||||
{
|
||||
if (!ptr_)
|
||||
{
|
||||
handleFatalError("LazyConstructor<T> is not constructed");
|
||||
handleFatalError("LazyConstructor<T>");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ class UAVCAN_EXPORT LazyConstructor
|
||||
{
|
||||
if (ptr_)
|
||||
{
|
||||
handleFatalError("LazyConstructor<T> is already constructed");
|
||||
handleFatalError("LazyConstructor<T>");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ class UAVCAN_EXPORT MethodBinder
|
||||
{
|
||||
if (!operator bool())
|
||||
{
|
||||
handleFatalError("Null method binder");
|
||||
handleFatalError("Null binder");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user