Automapper Exception Handling

106 views
Skip to first unread message

eric.r...@gmail.com

unread,
Feb 23, 2015, 1:56:58 PM2/23/15
to automapp...@googlegroups.com
** I realize this is not the original intent of automapper **

When converting DTO to Domain Object with automapper.  If you have a value object on a domain object that throws an exception based on certain criteria is there way to throw that exception during a mapping instead of AutoMapper.AutoMapperMappingException?


Jimmy Bogard

unread,
Feb 23, 2015, 2:53:33 PM2/23/15
to automapp...@googlegroups.com
Well, not OOTB. I have that wrapping exception because you don't have context about what is going on. The stack trace would be useless. I do have the inner exception for you, though.

On Mon Feb 23 2015 at 12:57:00 PM CST <eric.r...@gmail.com> wrote:
** I realize this is not the original intent of automapper **

When converting DTO to Domain Object with automapper.  If you have a value object on a domain object that throws an exception based on certain criteria is there way to throw that exception during a mapping instead of AutoMapper.AutoMapperMappingException?


--
You received this message because you are subscribed to the Google Groups "AutoMapper-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to automapper-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages