Added new function

This function is used for generate internal exceptions