get error message in AR

{Boy Said}

What about when you called $arClass->save(), then nothing insert into DB, no error show? We can call a property of AR to show the error messages, then we know what's wrong.

{Code}

 //record Reequtaion
$newReEquation = new Reequation();
$newReEquation->uid = Yii::app()->user->id;
$newReEquation->first = $newEquation->first;
$newReEquation->operator = $newEquation->operator;
 $newReEquation->second = $newEquation->second;

$newReEquation->save();//save
print_r($newReEquation->errors); //display error messages after save()