3963 "Created: / 10-07-1997 / 14:57:51 / stefan" |
3963 "Created: / 10-07-1997 / 14:57:51 / stefan" |
3964 "Modified: / 26-09-2012 / 15:08:21 / cg" |
3964 "Modified: / 26-09-2012 / 15:08:21 / cg" |
3965 ! |
3965 ! |
3966 |
3966 |
3967 setLabelFor:errorDescriptionMessage in:aProcess |
3967 setLabelFor:errorDescriptionMessage in:aProcess |
|
3968 self setLabelFor:errorDescriptionMessage in:aProcess orElseInLocation:'' |
|
3969 |
|
3970 "Modified: / 03-12-2017 / 15:09:55 / cg" |
|
3971 "Modified: / 18-02-2019 / 12:02:42 / Claus Gittinger" |
|
3972 ! |
|
3973 |
|
3974 setLabelFor:errorDescriptionMessage in:aProcessOrNil orElseInLocation:aLocationString |
|
3975 "set the window-title and the exceptionInfo label's string" |
|
3976 |
3968 |l lines processNameOrNil pidOrNil osPidString colorUsed| |
3977 |l lines processNameOrNil pidOrNil osPidString colorUsed| |
3969 |
3978 |
3970 lines := errorDescriptionMessage asStringCollection. |
3979 lines := errorDescriptionMessage asStringCollection. |
3971 lines size > 1 ifTrue:[ |
3980 lines size > 1 ifTrue:[ |
3972 l := lines first |
3981 l := lines first |
3973 ] ifFalse:[ |
3982 ] ifFalse:[ |
3974 l := errorDescriptionMessage. |
3983 l := errorDescriptionMessage. |
3975 ]. |
3984 ]. |
3976 |
3985 |
3977 l := l , ' ('. |
3986 aProcessOrNil notNil ifTrue:[ |
3978 Error handle:[:ex | |
3987 l := l , ' ('. |
3979 l := l , '???' |
3988 Error handle:[:ex | |
3980 ] do:[ |
3989 l := l , '???' |
3981 processNameOrNil := aProcess name. |
3990 ] do:[ |
3982 processNameOrNil notNil ifTrue:[ |
3991 processNameOrNil := aProcessOrNil name. |
3983 l := l , (processNameOrNil contractTo:20) , ''. |
3992 processNameOrNil notNil ifTrue:[ |
3984 ]. |
3993 l := l , (processNameOrNil contractTo:20) , ''. |
3985 pidOrNil := aProcess id printString. |
3994 ]. |
3986 l := l , '[' , pidOrNil , ']'. |
3995 pidOrNil := aProcessOrNil id printString. |
3987 ]. |
3996 l := l , '[' , pidOrNil , ']'. |
3988 l := l , ')'. |
3997 ]. |
|
3998 l := l , ')'. |
|
3999 ]. |
3989 self label:l. |
4000 self label:l. |
3990 |
4001 |
3991 ((ShowThreadID == true) and:[OperatingSystem isMSDOSlike]) ifTrue:[ |
4002 ((ShowThreadID == true) and:[OperatingSystem isMSDOSlike]) ifTrue:[ |
3992 osPidString := ' {threadID: ',OperatingSystem getThreadId printString,'}'. |
4003 osPidString := ' {threadID: ',OperatingSystem getThreadId printString,'}'. |
3993 ]. |
4004 ]. |
3995 exceptionInfoLabel notNil ifTrue:[ |
4006 exceptionInfoLabel notNil ifTrue:[ |
3996 colorUsed := (isStoppedAtHaltOrBreakPoint == true) |
4007 colorUsed := (isStoppedAtHaltOrBreakPoint == true) |
3997 ifTrue:[ Color orange ] |
4008 ifTrue:[ Color orange ] |
3998 ifFalse:[ Color red ]. |
4009 ifFalse:[ Color red ]. |
3999 colorUsed := colorUsed contrastingColorFor:exceptionInfoLabel backgroundColor. |
4010 colorUsed := colorUsed contrastingColorFor:exceptionInfoLabel backgroundColor. |
|
4011 |
|
4012 processNameOrNil notNil ifTrue:[ |
|
4013 exceptionInfoLabel |
|
4014 label:(resources |
|
4015 string:'%1 in process %2 [%3]%4' |
|
4016 with:(lines first withColor:colorUsed) |
|
4017 with:(processNameOrNil ? '') |
|
4018 with:(pidOrNil ? '') |
|
4019 with:(osPidString ? '')). |
|
4020 ] ifFalse:[ |
|
4021 exceptionInfoLabel |
|
4022 label:(resources |
|
4023 string:'%1 in %2%3' |
|
4024 with:(lines first withColor:colorUsed) |
|
4025 with:aLocationString |
|
4026 with:(osPidString ? '')). |
|
4027 ]. |
4000 |
4028 |
4001 exceptionInfoLabel |
|
4002 label:(resources |
|
4003 string:'%1 in process %2 [%3]%4' |
|
4004 with:(lines first withColor:colorUsed) |
|
4005 with:(processNameOrNil ? '') |
|
4006 with:(pidOrNil ? '') |
|
4007 with:(osPidString ? '')). |
|
4008 |
|
4009 exceptionInfoLabel |
4029 exceptionInfoLabel |
4010 helpText:(((resources stringWithCRs:'Error description:\') withColor:Color gray) |
4030 helpText:(((resources stringWithCRs:'Error description:\') withColor:Color gray) |
4011 ,(lines asStringWith:Character cr)). |
4031 ,(lines asStringWith:Character cr)). |
4012 ]. |
4032 ]. |
4013 |
4033 |
4014 "Modified: / 03-12-2017 / 15:09:55 / cg" |
4034 "Created: / 18-02-2019 / 12:02:11 / Claus Gittinger" |
4015 ! ! |
4035 ! ! |
4016 |
4036 |
4017 !DebugView methodsFor:'interrupt handling'! |
4037 !DebugView methodsFor:'interrupt handling'! |
4018 |
4038 |
4019 contextInterrupt |
4039 contextInterrupt |