fix compile errror - catch exception and return false