Handling Errors in Perspective

Hi cmallonee, I'm doing as suggested. To the popup window I'm passing the traceback.

On a View component

def runAction(self, event):
	try:
		_.update_db_with_error()
	except:
		_.error(self)

Script module

def error(_self):
	if _self.session.props.device.type == 'designer':
		raise
	
	params = {'message': traceback.format_exc()}
	system.perspective.openPopup(
		'random_id',
		'Popup/ErrorMessage',
		params=params,
		title='EXECUTION ERROR: contact developers',
		modal=True
	)

I noticed that if I'm NOT using try/catch on the View component I'm getting native error window with full traceback which includes the cause (which is sooo good) of the exception, like this

caused by SQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`mes`.`product_code_line`, CONS.....

But when I'm using try/catch with traceback.format_exc() it cuts the trace and last message is

line 122, in update_db Exception: java.lang.Exception: Error executing system.db.runPrepUpdate(DELETE FROM product_code WHERE id = ?, [25], db_con, , false, false)

Is there the way to capture full exception trace by traceback.format_exc() as same as the native error window?