Added new dispatcher exception.

This exception is meant for custom error handling in the dispatcher method.
Also added a test for the new exception.

if this logic is working in any other way which i didnt find please update me and feel free to reject.