我正在做一个android项目,我正在试图弄清楚如何向调用线程抛回一个异常。我需要将异常对象抛回活动中的调用方法,以便活动可以根据返回的异常执行某些操作。the exception as its null catch (Exception ex) throw ex; //Don't handle theexception, throw the exception backto the call
当您试图从ClassLibrary向另一个项目抛出新的异常时,Visual将打开Class1.cs并处理错误。我的问题是:如何将异常从被调用的函数(ClassLibrary)抛给调用函数(Windows)?注意事项:我不想抛出原始异常,我想抛出这样的自定义异常throw new Exception("change your password")