如果MailFrom不正确,catch的异常名称是什么? [英] what is the name of exception for catch if MailFrom is not correct ?

查看:85
本文介绍了如果MailFrom不正确,catch的异常名称是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hii,\





我想写多个捕获,一个包含一些东西,如果Mailfrom错了我想要进入那个例外块。这种类型的例外是什么



我真正想做的是..如果万一我的邮件无法正常工作,我会使用其他替代方式发送电子邮件,以便邮件继续工作..我该怎么做

Hii , \


I want to write multiple catch , one includes something , that if Mailfrom is wrong i want to enter into that exception block. What is the exception for this type

What i actually wanted to do is .. if in case my From mail is not working i send the email using other alternative so that mail continues to work .. How can i do that

推荐答案

为rhe Exception类添加一个catch,运行一个测试ti生成异常,并检查捕获的异常。这将告诉你什么被抛出。
add a catch for rhe Exception class, run a test ti generate the exception, and inspect the exception caught. This will tell you what is being thrown.


这篇关于如果MailFrom不正确,catch的异常名称是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆