Shorter error strings - saves ~200 bytes

This commit is contained in:
Pavel Kirienko
2014-04-16 16:59:58 +04:00
parent 97cb814ffd
commit f8b10ab003
12 changed files with 17 additions and 16 deletions
+2 -2
View File
@@ -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(),
+1 -1
View File
@@ -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");
}
}