[Glass] Exception and ObjectLogEntry question

BrunoBB via Glass glass at lists.gemtalksystems.com
Sun May 1 18:31:02 PDT 2016


Hi All,

I have an exception called: AlreadyExistApplicationOrFormNameException.

The code is like this:
[aBoolean
	ifFalse: [self doSomething]
	ifTrue: [AlreadyExistApplicationOrFormNameException signal].
] on: AlreadyExistApplicationOrFormNameException 
do: [:ex | (ObjectLogEntry info: 'Rejected Form Save' object: ex) addToLog.
^System commit].
self doMoreThings.

The System commit is because Seaside will abort the transaction when an
Exception is thrown preventing the log entry to be saved.

For now everything is OK.

But i want to move this code to #defaultAction in the Exception:
defaultAction
	"When this exception happend nothing is done (just resume the execution).
	Seaside will abort the Request and the Form will be not stored in the
repository"

	^[:ex | (ObjectLogEntry info: 'Rejected Form Save' object: ex) addToLog.
			System commit.
			ex resume].

But there is nothing in the ObjectLogEntry.

Any idea what is wrong with this ?
(i have read chapter 13 "Handling Exceptions" but not idea why the entry is
not saved)

Regards,
Bruno



--
View this message in context: http://forum.world.st/Exception-and-ObjectLogEntry-question-tp4893180.html
Sent from the GLASS mailing list archive at Nabble.com.


More information about the Glass mailing list