Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
DBD::Oracle::st执行失败:系统生成的消息_Oracle - Fatal编程技术网

DBD::Oracle::st执行失败:系统生成的消息

DBD::Oracle::st执行失败:系统生成的消息,oracle,Oracle,对于oracle系统,在准备/执行查询期间生成的软件错误消息无效。在网页上向用户显示完整的查询。要将系统生成的消息替换为用户公用消息 例如: 软件错误: DBD::Oracle::st execute failed:ORA-01722:无效数字(DBD错误:可能在“从实验室设备详细信息中选择设备ID、设备ShortName、MAXLIMITEDDAYS、状态、设备名称,其中CATEGORYID='3'和子类别ID=''和状态!='DELETE''的字符136附近出现错误)[对于语句“在/proj

对于oracle系统,在准备/执行查询期间生成的软件错误消息无效。在网页上向用户显示完整的查询。要将系统生成的消息替换为用户公用消息

例如:

软件错误:

DBD::Oracle::st execute failed:ORA-01722:无效数字(DBD错误:可能在“从实验室设备详细信息中选择设备ID、设备ShortName、MAXLIMITEDDAYS、状态、设备名称,其中CATEGORYID='3'和子类别ID=''和状态!='DELETE''的字符136附近出现错误)[对于语句“在/proj/aa/bb/Source/Global_Routines_general_apps.pm第126行,从LAB_EQUIPMENT_DETAILS中选择EQUIPID、EQUIPSHORTNAME、MAXLIMITEDDAYS、STATUS、EQUIPNAME,其中CATEGORYID='3'和SUBCATEGORYID='***'和STATUS!='DELETE'”

如需帮助,请向网站管理员([…])发送邮件,给出此错误消息以及错误发生的时间和日期

谁能帮我做这件事


提前感谢。

只需将execute语句包装在一个eval块中并捕获错误

eval {
$sth->execute();
...
};
if ( $@ ) {
# log the full error message
write_log( $sth->errstr );

# and re-throw the common message 
die 'HEY!!!! Something is messed up here!';
}