Throw custome exception in ITypeConverter.

18 views
Skip to first unread message

vanleeu...@gmail.com

unread,
Jan 19, 2016, 10:28:03 AM1/19/16
to AutoMapper-users

I have a custom converter that implements ITypeConverter and will parse a string to a given Enum. 

 

When the string is not found as one of the Enum’s value’s. An Argument exception is thrown that is not caught by Automapper and the program stops executing.

 

I want to handle this exception from where the mapping is called. But don’t know how. 

Reply all
Reply to author
Forward
0 new messages