AssertionFailedError.st
author Claus Gittinger <cg@exept.de>
Tue, 09 Jul 2019 20:55:17 +0200
changeset 24417 03b083548da2
parent 22716 7c30dcd62c61
child 24644 55f4e9a8de61
permissions -rw-r--r--
#REFACTORING by exept class: Smalltalk class changed: #recursiveInstallAutoloadedClassesFrom:rememberIn:maxLevels:noAutoload:packageTop:showSplashInLevels: Transcript showCR:(... bindWith:...) -> Transcript showCR:... with:...
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
20445
2f93befb3416 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 11184
diff changeset
     1
"{ Encoding: utf8 }"
2f93befb3416 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 11184
diff changeset
     2
10650
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
"
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
 COPYRIGHT (c) 2007 by eXept Software AG
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
              All Rights Reserved
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
 This software is furnished under a license and may be used
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
 only in accordance with the terms of that license and with the
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
 inclusion of the above copyright notice.   This software may not
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
 be provided or otherwise made available to, or used by, any
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
 other person.  No title to or ownership of the software is
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
 hereby transferred.
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
"
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
"{ Package: 'stx:libbasic' }"
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
20445
2f93befb3416 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 11184
diff changeset
    16
"{ NameSpace: Smalltalk }"
2f93befb3416 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 11184
diff changeset
    17
2f93befb3416 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 11184
diff changeset
    18
ExecutionError subclass:#AssertionFailedError
10650
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
	instanceVariableNames:''
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
	classVariableNames:''
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
	poolDictionaries:''
11159
20e5de9571fc made it an error
Claus Gittinger <cg@exept.de>
parents: 10650
diff changeset
    22
	category:'Kernel-Exceptions-Errors'
10650
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
!
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
!AssertionFailedError class methodsFor:'documentation'!
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
copyright
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
"
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
 COPYRIGHT (c) 2007 by eXept Software AG
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
              All Rights Reserved
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 This software is furnished under a license and may be used
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
 only in accordance with the terms of that license and with the
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
 inclusion of the above copyright notice.   This software may not
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
 be provided or otherwise made available to, or used by, any
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
 other person.  No title to or ownership of the software is
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
 hereby transferred.
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
"
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
!
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
documentation
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
"
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
    Raised by failing assertions.
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
"
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
! !
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
20445
2f93befb3416 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 11184
diff changeset
    47
!AssertionFailedError class methodsFor:'testing'!
2f93befb3416 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 11184
diff changeset
    48
2f93befb3416 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 11184
diff changeset
    49
isProgramError
2f93befb3416 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 11184
diff changeset
    50
    "redefined in all exceptions which are programmer's errors,
2f93befb3416 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 11184
diff changeset
    51
     and which should probably not be ignored.
2f93befb3416 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 11184
diff changeset
    52
     I.e. a global error handler should reject and let a debugger get control."
2f93befb3416 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 11184
diff changeset
    53
2f93befb3416 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 11184
diff changeset
    54
    ^ true
2f93befb3416 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 11184
diff changeset
    55
! !
2f93befb3416 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 11184
diff changeset
    56
22686
977432cc6ce8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20445
diff changeset
    57
!AssertionFailedError methodsFor:'printing & storing'!
977432cc6ce8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20445
diff changeset
    58
977432cc6ce8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20445
diff changeset
    59
description
22716
7c30dcd62c61 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 22686
diff changeset
    60
    |descr|
7c30dcd62c61 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 22686
diff changeset
    61
7c30dcd62c61 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 22686
diff changeset
    62
    descr := super description.
7c30dcd62c61 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 22686
diff changeset
    63
    suspendedContext notNil ifTrue:[
7c30dcd62c61 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 22686
diff changeset
    64
        ^ descr,' {assert in ', suspendedContext printString,'}'
7c30dcd62c61 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 22686
diff changeset
    65
    ].
7c30dcd62c61 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 22686
diff changeset
    66
    ^ descr.
22686
977432cc6ce8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20445
diff changeset
    67
! !
977432cc6ce8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20445
diff changeset
    68
10650
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
!AssertionFailedError class methodsFor:'documentation'!
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
version
20445
2f93befb3416 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 11184
diff changeset
    72
    ^ '$Header$'
10650
fdec7f75c82e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
! !
20445
2f93befb3416 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 11184
diff changeset
    74