--- a/DebugView.st Sat Sep 14 17:58:43 2019 +0200
+++ b/DebugView.st Sun Sep 15 10:19:20 2019 +0200
@@ -6533,7 +6533,7 @@
"let user choose an exception class;
find and select the handling context for it"
- |exClass con|
+ |exClass con list sel cls initial|
(con := self selectedContext) isNil ifTrue:[
con := contextArray at:1
@@ -6542,11 +6542,20 @@
self information:'Context has already returned'.
^ self
].
+ list := (GenericException withAllSubclasses copyAsOrderedCollection sort:[:a :b | a name < b name]).
+
+ ((sel := codeView selectionAsString ? '') withoutSeparators notEmptyOrNil
+ and:[ (cls := Smalltalk classNamed:sel) notNil
+ and:[ list includes:cls ]]
+ ) ifTrue:[
+ initial := cls
+ ].
exClass := Dialog
choose:'Exception class:'
- fromList:(GenericException withAllSubclasses copyAsOrderedCollection sort:[:a :b | a name < b name])
+ fromList:list
lines:25
+ initialSelection:initial
title:'Choose Exception class'.
exClass isNil ifTrue:[^ self].