做成一个函数,传递你的object id进去区别就行了
function FatalError( ErrCode ,objid) {//...}
FatalError('xxxx error','obj1')