We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello Everyone
I Have Problem With IMethodInterceptor.OnException I Use Cauldron.Interception version 3.2.3 with this code
IMethodInterceptor.OnException
[InterceptorOptions(AlwaysCreateNewInstance = true)] [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] public class ExceptionInterceptorAttribute : Attribute, IMethodInterceptor, IDisposable { #region Fields private Type _declaringType; private MethodBase _methodBase; private object[] _values; #endregion #region IMethodInterceptor Members public void OnEnter(Type declaringType, object instance, MethodBase methodbase, object[] values) { _declaringType = declaringType; _methodBase = methodbase; _values = values; } public bool OnException(Exception e) { throw catchHandler(e, _declaringType, _methodBase, _values); } public void OnExit() { } #endregion #region Private Members private Exception catchHandler(Exception exception, Type type, MethodBase methodBase, object[] values) { return new Exception(exception.Message); } #endregion #region IDisposable Members public void Dispose() { _declaringType = null; _methodBase = null; _values = null; GC.SuppressFinalize(this); } #endregion }
When i reform exception an re-throw new exception my project debugging has break and project has stopped.
I replace body of OnException with this (re-throw without reform exception)
OnException
public bool OnException(Exception e) { catchHandler(e, _declaringType, _methodBase, _values); return true; }
debugging mode is run and back to host of project,how can i reform and re-throw exception with or without return true?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello Everyone
I Have Problem With
IMethodInterceptor.OnException
I Use Cauldron.Interception version 3.2.3 with this codeWhen i reform exception an re-throw new exception my project debugging has break and project has stopped.
I replace body of
OnException
with this (re-throw without reform exception)debugging mode is run and back to host of project,how can i reform and re-throw exception with or without return true?
The text was updated successfully, but these errors were encountered: