关于未知错误的处理。null指针还能set?BusinessException is never thrown in the method
课程6’30‘’左右,老师为了查看未知错误,把方法内部的throw给注释掉了
idea 提示 BusinessException is never thrown in the method
并且浏览器页面也不显示未知错误,而是 status=500
另外,老师这段代码我有点不理解,UserModel都是null了,还能调用setEncrptPassword()方法?????
我这样写了,控制台直接报java.lang.ClassCastException: java.lang.NullPointerException cannot be cast