array( 'kw' => 'NOT_MATCH', 'desc' => '未匹配到符合条件的记录', ), self::CAS_TOKEN_NOT_MATCH => array( 'kw' => 'CAS_TOKEN_NOT_MATCH', 'desc' => 'cas_token不匹配', ), self::COMMIT_TRANSACTION_FAIL => array( 'kw' => 'COMMIT_TRANSACTION_FAIL', 'desc' => '提交事务失败', ), ); } /** * * 根据异常的关键词获取文本型的描述 * @param string $kw * @return false | string */ static public function getTextDescByKW($kw) { $descs = self::getDesc(); if (isset($descs[$kw])) { return $descs[$kw]['desc']; } return false; } }