--- a/Breakpoint.st Wed Feb 20 11:00:00 2019 +0100
+++ b/Breakpoint.st Wed Feb 20 21:45:19 2019 +0100
@@ -159,38 +159,42 @@
sourceLines := source asStringCollection.
sourceLine := sourceLines at:lineNr ifAbsent:[nil].
sourceLine notNil ifTrue:[
- sourceLine := (sourceLine withoutLeadingSeparators contractAtEndTo:60) allItalic withColor:Color red darkened.
- message := 'Breakpoint encountered at:\\%3\\line %1 in %2'.
+ sourceLine := (sourceLine "withoutLeadingSeparators" contractAtEndTo:60) allItalic withColor:Color red darkened.
+ message := 'Breakpoint encountered at line %1 in %2\near:\%3'.
lineNr > 1 ifTrue:[
prevLine := sourceLines at:(lineNr-1) ifAbsent:[nil].
prevLine notEmptyOrNil ifTrue:[
- prevLine := prevLine withoutLeadingSeparators.
+ "/ prevLine := prevLine withoutLeadingSeparators.
prevLine notEmpty ifTrue:[
prevLine := (prevLine contractAtEndTo:60) allItalic.
- prevLine := '...', Character cr , prevLine.
+ lineNr > 2 ifTrue:[
+ prevLine := '...', Character cr , prevLine.
+ ].
] ifFalse:[
prevLine := '...'.
].
prevLine := prevLine withColor:Color grey.
- message := 'Breakpoint encountered at:\\%4\%3\\line %1 in %2'.
+ message := 'Breakpoint encountered at line %1 in %2\near:\%4\%3'.
].
].
lineNr < (sourceLines size) ifTrue:[
nextLine := sourceLines at:(lineNr+1) ifAbsent:[nil].
nextLine notEmptyOrNil ifTrue:[
- nextLine := nextLine withoutLeadingSeparators.
+ "/ nextLine := nextLine withoutLeadingSeparators.
nextLine notEmpty ifTrue:[
- nextLine := (nextLine withoutLeadingSeparators contractAtEndTo:60) allItalic.
- nextLine := nextLine , Character cr , '...'.
+ nextLine := (nextLine contractAtEndTo:60) allItalic.
+ lineNr < (sourceLines size - 1) ifTrue:[
+ nextLine := nextLine , Character cr , '...'.
+ ].
] ifFalse:[
nextLine := '...'.
].
nextLine := nextLine withColor:Color grey.
prevLine notNil ifTrue:[
- message := 'Breakpoint encountered at:\\%4\%3\%5\\line %1 in %2'.
+ message := 'Breakpoint encountered at line %1 in %2\near:\%4\%3\%5'.
] ifFalse:[
- message := 'Breakpoint encountered at:\\%3\%5\\line %1 in %2'.
+ message := 'Breakpoint encountered at line %1 in %2\near:\%3\%5'.
].
].
].
@@ -201,14 +205,15 @@
"/ to disable this breakpoint:
"/ description disable.
- BreakPointInterrupt
- raiseRequestWith: self
+ BreakPointInterrupt basicNew
+ raiseRequestWith:self
errorString:(message withCRs
bindWith:self line
with:where
with:sourceLine
with:prevLine
with:nextLine)
+ in:sender
"/ in:sender.
].
(description shouldTraceIn:sender) ifTrue:[
@@ -223,7 +228,7 @@
"Created: / 15-06-2011 / 12:48:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 11-07-2011 / 18:17:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 21-10-2017 / 15:24:35 / cg"
- "Modified (comment): / 20-02-2019 / 10:48:56 / Claus Gittinger"
+ "Modified: / 20-02-2019 / 21:41:20 / Claus Gittinger"
! !
!Breakpoint methodsFor:'initialization'!
@@ -252,6 +257,7 @@
"append a printed representation of the receiver to the argument, aStream"
aStream nextPutAll: 'BPNT '.
+ aStream nextPutAll:(self isEnabled ifTrue:['(enabled) '] ifFalse:['(disabled) ']).
self printBreakpointNrInDebuggerOn:aStream.
aStream nextPutAll: 'at'.
(position isNil and:[line isNil]) ifTrue:[
@@ -270,7 +276,7 @@
].
"Modified: / 24-04-2013 / 20:42:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 20-02-2019 / 10:42:40 / Claus Gittinger"
+ "Modified: / 20-02-2019 / 15:50:37 / Claus Gittinger"
! !
!Breakpoint methodsFor:'support'!