1
0
Fork 0

WebApp: Provide a very simple way to report an error..

This commit is contained in:
Holger Hans Peter Freyther 2010-12-12 10:39:57 +01:00
parent d10427f782
commit ce184032e8
1 changed files with 35 additions and 10 deletions

View File

@ -77,7 +77,38 @@ Iliad.ILWidget subclass: PhoneConfigWidget [
] ]
] ]
Iliad.ILWidget subclass: LUWidget [ Iliad.ILWidget subclass: ErrorWidget [
| reason |
ErrorWidget class >> initWith: anError [
^ self new
reason: anError;
yourself
]
reason: aReason [
reason := aReason.
]
contents [
^ [:e | e text: reason ]
]
]
Iliad.ILWidget subclass: ProcedureWidget [
runProcedure: aBlock name: aName[
| proc |
[
proc := aBlock value.
proc run.
self session procedures add: proc.
] on: Exception do: [:e |
self lightbox: (ErrorWidget initWith: aName, ' could not be started.')
]
]
]
ProcedureWidget subclass: LUWidget [
contents [ contents [
^ [:e | ^ [:e |
e a e a
@ -87,14 +118,11 @@ Iliad.ILWidget subclass: LUWidget [
] ]
doLU [ doLU [
| lu | self runProcedure: [self application gsmServer doLU: self session gsmConfig] name: 'LU'
lu := self application gsmServer doLU: self session gsmConfig.
lu run.
self session procedures add: lu.
] ]
] ]
Iliad.ILWidget subclass: CallWidget [ ProcedureWidget subclass: CallWidget [
contents [ contents [
^[:e | ^[:e |
e form build: [:form | e form build: [:form |
@ -104,10 +132,7 @@ Iliad.ILWidget subclass: CallWidget [
] ]
placeCall: aNumber [ placeCall: aNumber [
| call | self runProcedure: [self application gsmServer doCallNumber: self session gsmConfig] name: 'Call'
call := self application gsmServer doCallNumber: self session gsmConfig.
call run.
self session procedures add: call.
] ]
] ]