AnsweredAssumed Answered

MQX error strategy

Question asked by intertronic on Mar 4, 2015
Latest reply on Mar 5, 2015 by Radek Sestak

Hi,

 

there are some mqx functions that return an error-code and some functions set the task-error-code internal. Such a mixed / inconsistent system is perplexing.

 

If someone want to add custom error-codes this system is unnecessary complicated. Because you have to clear the old error before you can set your custom code.

And also if you don't want to add custom error-codes your sourcecode is full of _task_set_error(MQX_OK);

 

You just have to look at the mqx source, then you see a lot of unnecessary task-error-handling.

Sometimes the error is returned as pointer and also the task error is set. And maybe the error is also get and cleared in the calling function.

Sometimes the calling functions gets the task-error before an internal call, to clear it after a call to some other function.

Is this overhead really necessary?

What is the actual/future strategy of freescale?

 

Regards

Outcomes