预订演示

请注意 : 本帮助页面不适用于最新版本的Enterprise Architect. 最新的帮助文档在这里.

前页 后页

错误

Printing an error message

var cephes_errors = [
"'unknown'", /* error code 0 */
"'domain'", /* error code 1 */
"'singularity'", /* et seq. */
"'overflow'",
"'underflow'",
"'total loss of precision'",
"'partial loss of precision'" ];

function printError()
{
var er = cephes.geterror();
if(er>0)
{
Session.Output( "cephes error " + err + " " + cephes_errors[er]);
}
}


Testing for error

if(cephes.inerror())
{
printError();
}