updated the reflection based exception factory