Adds exception handling in DSM
Merge pull request #1 from lukecampbell/bs

Adds exception handling in DSM