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 [
^ [:e |
e a
@ -87,14 +118,11 @@ Iliad.ILWidget subclass: LUWidget [
]
doLU [
| lu |
lu := self application gsmServer doLU: self session gsmConfig.
lu run.
self session procedures add: lu.
self runProcedure: [self application gsmServer doLU: self session gsmConfig] name: 'LU'
]
]
Iliad.ILWidget subclass: CallWidget [
ProcedureWidget subclass: CallWidget [
contents [
^[:e |
e form build: [:form |
@ -104,10 +132,7 @@ Iliad.ILWidget subclass: CallWidget [
]
placeCall: aNumber [
| call |
call := self application gsmServer doCallNumber: self session gsmConfig.
call run.
self session procedures add: call.
self runProcedure: [self application gsmServer doCallNumber: self session gsmConfig] name: 'Call'
]
]