Merge pull request #347 from jialinsun/master

代码修改，详情请见commit log
修复exception alert bug，重构代码。忽略Agent部分修改