Reference » Macros » M_PARAM_CHECK

M_PARAM_CHECK(Cond,Text) macro

Declared in elBase.h


Similar to M_ASSERT(Cond), but with a more user-friendly output.


Instead of generating a generic error message, this macro uses the provided Text string, which is more useful for developers than the generic output of M_ASSERT.

@M_ASSERT@ is useful for class developers, when testing internal consistency rules for that class.

'M_PARAM_CHECK' is useful for class users, when testing the input validity (as its name suggests).

It's used in various base class templates (e.g. MVector), where performance is critical, so input checking should not be done in RELEASE mode.

Wherever the performance is not critical (such as in window classes), it's better to use the exceptions-based error reporting mechanism instead (see MApp::genException).

Let us know

Please Contact us to report any errors on this page, or to suggest any improvements.

Miranor Home | About Miranor | About Elgrint | Create account | Login | Account settings | Contact Us | Privacy Policy | Site map

© Copyright 2014 by Miranor. All rights reserved. By using this site you agree to the Terms of Use.

Page last updated on August 10th, 2014.