Created
November 25, 2011 09:00
-
-
Save slodge/1393086 to your computer and use it in GitHub Desktop.
Refactoring this... Ctrl R+M
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try | |
{ | |
return (IMXActionResult)actionMethodInfo.Invoke(this, argumentList.ToArray()); | |
} | |
catch (ArgumentException exception) | |
{ | |
// this should be impossible - as we've checked the types in the GenerateActionMap method | |
return ShowError("parameter type mismatch seen " + exception.Message); | |
} | |
catch (TargetParameterCountException exception) | |
{ | |
// this should be impossible as we've created the parameter array above to match the method signature | |
return ShowError("parameter count mismatch seen " + exception.Message); | |
} | |
catch (TargetInvocationException exception) | |
{ | |
if (exception.InnerException != null) | |
return ShowError(exception.InnerException); | |
else | |
return ShowError("unknown action exception seen " + exception.Message); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment