Error messages...

 
Given stderror.mqh and https://docs.mql4.com/trading/errors I could spot some differences... ERR_NOT_ENOUGH_RIGHTS (7) is missing from documentation ERR_MALFUNCTIONAL_TRADE (9) is missing from documentation ERR_BROKER_BUSY (137) is missing from documentation ERR_TRADE_EXPIRATION_DENIED (147) is missing from stderror.mqh and gives 'Variable not defined'... Didn't check for the runtime errors. ..
 
Do not mix header file with documentation. If some errors are not descripted, it means that You never get these errors.

stderror.mqh was created about 2 years ago as example only. etalon is https://docs.mql4.com/constants/errors
 
stringo:
Do not mix header file with documentation. If some errors are not descripted, it means that You never get these errors.

stderror.mqh was created about 2 years ago as example only. etalon is https://docs.mql4.com/constants/errors
Sounds mental.

stderror.mqh is located in the standard include directory and distributed officially in every new build as well as the corresponding metaeditor documentation. It's a shame that users are not advised to use it. What's the point of having it there?

Can you imaging, e.g., Linus Torvalds suggesting "don't use /usr/include please, it's full of two years old examples"? :(
 
#include <stderror.mqh>
#include <stdlib.mqh>

void ShowError()
{
     Print("OrderSend failed with error # ",ErrorDescription(GetLastError()));
     return(0);
}

And this is idea how to use ErrorDescription...

Reason: