Open Source Content Management System

PHP Error handling function mgd_errstr

Get latest error message.

string mgd_errstr(void);

Returns latest error message ,or 'MGD_ERR_OK' in case of no error.

Example

$obj = new midgard_person();
$obj->username = "John";

if(!$obj->create()) 
    $errstr = mgd_errstr();
    echo "Coudn't create person record because: ${errstr}.";

Back to Error handling

Designed by Nemein, hosted by Anykey