When the data class is being run from the Web, if an error occur in the SQL command, I get the stacktrace of the entire hierarchy up to the .aspx page. But, when the data class is being accessed from a desktop application, stacktrace only returns the hierarchy up to its own level, thus only one level. How can I obtain the entire hierarchy in desktop mode as well?