MessageNotUnderstood.st
author Stefan Vogel <sv@exept.de>
Fri, 27 Oct 2017 16:14:37 +0200
branchexpecco_2_11_1_branch
changeset 22329 20662662693b
parent 20447 4b8519e42c13
child 20578 39641ba8d6e0
child 22522 17b213494d2a
permissions -rw-r--r--
Add 2.11.0 Patch
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7586
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6669
diff changeset
     1
"
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6669
diff changeset
     2
 COPYRIGHT (c) 2001 by eXept Software AG
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6669
diff changeset
     3
              All Rights Reserved
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6669
diff changeset
     4
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6669
diff changeset
     5
 This software is furnished under a license and may be used
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6669
diff changeset
     6
 only in accordance with the terms of that license and with the
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6669
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6669
diff changeset
     8
 be provided or otherwise made available to, or used by, any
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6669
diff changeset
     9
 other person.  No title to or ownership of the software is
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6669
diff changeset
    10
 hereby transferred.
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6669
diff changeset
    11
"
5976
4596197c1e0d initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
"{ Package: 'stx:libbasic' }"
4596197c1e0d initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
18290
5ea0b888d79d class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 16414
diff changeset
    14
"{ NameSpace: Smalltalk }"
5ea0b888d79d class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 16414
diff changeset
    15
20447
4b8519e42c13 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18302
diff changeset
    16
ExecutionError subclass:#MessageNotUnderstood
5976
4596197c1e0d initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	instanceVariableNames:''
4596197c1e0d initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	classVariableNames:''
4596197c1e0d initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
	poolDictionaries:''
6210
d7039e2ae776 caetgory change and documentation added
Claus Gittinger <cg@exept.de>
parents: 5982
diff changeset
    20
	category:'Kernel-Exceptions-Errors'
5976
4596197c1e0d initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
!
4596197c1e0d initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
6210
d7039e2ae776 caetgory change and documentation added
Claus Gittinger <cg@exept.de>
parents: 5982
diff changeset
    23
!MessageNotUnderstood class methodsFor:'documentation'!
d7039e2ae776 caetgory change and documentation added
Claus Gittinger <cg@exept.de>
parents: 5982
diff changeset
    24
7586
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6669
diff changeset
    25
copyright
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6669
diff changeset
    26
"
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6669
diff changeset
    27
 COPYRIGHT (c) 2001 by eXept Software AG
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6669
diff changeset
    28
              All Rights Reserved
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6669
diff changeset
    29
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6669
diff changeset
    30
 This software is furnished under a license and may be used
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6669
diff changeset
    31
 only in accordance with the terms of that license and with the
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6669
diff changeset
    32
 inclusion of the above copyright notice.   This software may not
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6669
diff changeset
    33
 be provided or otherwise made available to, or used by, any
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6669
diff changeset
    34
 other person.  No title to or ownership of the software is
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6669
diff changeset
    35
 hereby transferred.
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6669
diff changeset
    36
"
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6669
diff changeset
    37
!
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6669
diff changeset
    38
6210
d7039e2ae776 caetgory change and documentation added
Claus Gittinger <cg@exept.de>
parents: 5982
diff changeset
    39
documentation
d7039e2ae776 caetgory change and documentation added
Claus Gittinger <cg@exept.de>
parents: 5982
diff changeset
    40
"
d7039e2ae776 caetgory change and documentation added
Claus Gittinger <cg@exept.de>
parents: 5982
diff changeset
    41
    raised when a message is sent to an object, which is not understood
d7039e2ae776 caetgory change and documentation added
Claus Gittinger <cg@exept.de>
parents: 5982
diff changeset
    42
    by the receiver, and the message was not handled by a class specific
d7039e2ae776 caetgory change and documentation added
Claus Gittinger <cg@exept.de>
parents: 5982
diff changeset
    43
    doesNotUnderstand: handler.
d7039e2ae776 caetgory change and documentation added
Claus Gittinger <cg@exept.de>
parents: 5982
diff changeset
    44
"
d7039e2ae776 caetgory change and documentation added
Claus Gittinger <cg@exept.de>
parents: 5982
diff changeset
    45
! !
5976
4596197c1e0d initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
15188
e1937381139c class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
    47
!MessageNotUnderstood class methodsFor:'initialization'!
e1937381139c class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
    48
e1937381139c class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
    49
initialize
e1937381139c class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
    50
    NotifierString := 'message not understood'.
e1937381139c class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
    51
e1937381139c class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
    52
    "
e1937381139c class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
    53
     self initialize
e1937381139c class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
    54
    "
e1937381139c class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
    55
! !
e1937381139c class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
    56
6667
cd760a230e58 *** empty log message ***
ca
parents: 6210
diff changeset
    57
!MessageNotUnderstood class methodsFor:'save evaluation'!
cd760a230e58 *** empty log message ***
ca
parents: 6210
diff changeset
    58
cd760a230e58 *** empty log message ***
ca
parents: 6210
diff changeset
    59
ignoreNotUnderstoodOf:aSelector in:aBlock
cd760a230e58 *** empty log message ***
ca
parents: 6210
diff changeset
    60
    "evaluate aBlock; if a messageNotUnderstood occurs,
cd760a230e58 *** empty log message ***
ca
parents: 6210
diff changeset
    61
     for which the message was aSelector, ignore the error
cd760a230e58 *** empty log message ***
ca
parents: 6210
diff changeset
    62
     and return.
cd760a230e58 *** empty log message ***
ca
parents: 6210
diff changeset
    63
     Other selector errors lead into the debugger.
cd760a230e58 *** empty log message ***
ca
parents: 6210
diff changeset
    64
     If no error occurs, return the blocks value"
cd760a230e58 *** empty log message ***
ca
parents: 6210
diff changeset
    65
cd760a230e58 *** empty log message ***
ca
parents: 6210
diff changeset
    66
    ^ self handle:[:ex |
6669
992abad6f5aa *** empty log message ***
ca
parents: 6668
diff changeset
    67
        ex selector == aSelector ifFalse:[
6667
cd760a230e58 *** empty log message ***
ca
parents: 6210
diff changeset
    68
            ex reject
cd760a230e58 *** empty log message ***
ca
parents: 6210
diff changeset
    69
        ]
cd760a230e58 *** empty log message ***
ca
parents: 6210
diff changeset
    70
    ] do:aBlock.
6668
f2489cb96530 *** empty log message ***
ca
parents: 6667
diff changeset
    71
!
f2489cb96530 *** empty log message ***
ca
parents: 6667
diff changeset
    72
f2489cb96530 *** empty log message ***
ca
parents: 6667
diff changeset
    73
ignoreNotUnderstoodOfAny:aCollectionOfSelectors in:aBlock
f2489cb96530 *** empty log message ***
ca
parents: 6667
diff changeset
    74
    "evaluate aBlock; if a messageNotUnderstood occurs,
f2489cb96530 *** empty log message ***
ca
parents: 6667
diff changeset
    75
     for which the message was any in aCollectionOfSelectors, ignore the error
f2489cb96530 *** empty log message ***
ca
parents: 6667
diff changeset
    76
     and return.
f2489cb96530 *** empty log message ***
ca
parents: 6667
diff changeset
    77
     Other selector errors lead into the debugger.
f2489cb96530 *** empty log message ***
ca
parents: 6667
diff changeset
    78
     If no error occurs, return the blocks value"
f2489cb96530 *** empty log message ***
ca
parents: 6667
diff changeset
    79
f2489cb96530 *** empty log message ***
ca
parents: 6667
diff changeset
    80
    ^ self handle:[:ex |
6669
992abad6f5aa *** empty log message ***
ca
parents: 6668
diff changeset
    81
        (aCollectionOfSelectors includesIdentical:ex selector) ifFalse:[
6668
f2489cb96530 *** empty log message ***
ca
parents: 6667
diff changeset
    82
            ex reject
f2489cb96530 *** empty log message ***
ca
parents: 6667
diff changeset
    83
        ]
f2489cb96530 *** empty log message ***
ca
parents: 6667
diff changeset
    84
    ] do:aBlock.
6667
cd760a230e58 *** empty log message ***
ca
parents: 6210
diff changeset
    85
! !
cd760a230e58 *** empty log message ***
ca
parents: 6210
diff changeset
    86
5982
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
    87
!MessageNotUnderstood methodsFor:'accessing'!
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
    88
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
    89
message
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
    90
    ^ parameter
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
    91
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
    92
    "
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
    93
     [
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
    94
        123 perform:#foo
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
    95
     ] on:MessageNotUnderstood do:[:ex |
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
    96
        Transcript show:'message object: '; showCR:ex message storeString.
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
    97
        Transcript show:'receiver: '; showCR:ex receiver storeString.
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
    98
        Transcript show:'selector: '; showCR:ex message selector storeString.
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
    99
        Transcript show:'arguments: '; showCR:ex message arguments storeString.
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
   100
     ]
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
   101
    "
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
   102
!
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
   103
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
   104
receiver
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
   105
    ^ originator
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
   106
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
   107
    "
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
   108
     [
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
   109
        123 perform:#foo
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
   110
     ] on:MessageNotUnderstood do:[:ex |
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
   111
        Transcript showCR:ex receiver
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
   112
     ]
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
   113
    "
6668
f2489cb96530 *** empty log message ***
ca
parents: 6667
diff changeset
   114
!
f2489cb96530 *** empty log message ***
ca
parents: 6667
diff changeset
   115
f2489cb96530 *** empty log message ***
ca
parents: 6667
diff changeset
   116
selector
f2489cb96530 *** empty log message ***
ca
parents: 6667
diff changeset
   117
    ^ parameter selector
f2489cb96530 *** empty log message ***
ca
parents: 6667
diff changeset
   118
f2489cb96530 *** empty log message ***
ca
parents: 6667
diff changeset
   119
    "
f2489cb96530 *** empty log message ***
ca
parents: 6667
diff changeset
   120
     [
f2489cb96530 *** empty log message ***
ca
parents: 6667
diff changeset
   121
        123 perform:#foo
f2489cb96530 *** empty log message ***
ca
parents: 6667
diff changeset
   122
     ] on:MessageNotUnderstood do:[:ex |
f2489cb96530 *** empty log message ***
ca
parents: 6667
diff changeset
   123
        Transcript show:'selector: '; showCR:ex selector storeString.
f2489cb96530 *** empty log message ***
ca
parents: 6667
diff changeset
   124
     ]
f2489cb96530 *** empty log message ***
ca
parents: 6667
diff changeset
   125
    "
5982
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
   126
! !
2965b58b4258 ANSI accessors
Claus Gittinger <cg@exept.de>
parents: 5976
diff changeset
   127
8501
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   128
!MessageNotUnderstood methodsFor:'printing & storing'!
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   129
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   130
description
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   131
    "the human readable description of the exception"
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   132
18302
67840a4affd1 class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 18290
diff changeset
   133
    |searchClass sel description sender|
8501
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   134
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   135
    "extract the class that should have implemented the message.
16414
718569261384 class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 15188
diff changeset
   136
     (in case of a super-send, this is not the receiver's class)"
18302
67840a4affd1 class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 18290
diff changeset
   137
67840a4affd1 class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 18290
diff changeset
   138
    "/ suspendedContext is the actual doesNotUnderstand context;
67840a4affd1 class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 18290
diff changeset
   139
    "/ its sender is the bad (failing) one, which has the search class information
67840a4affd1 class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 18290
diff changeset
   140
    "/ (the doesNotUnderstand is always an undirected send)
67840a4affd1 class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 18290
diff changeset
   141
    "/ Q: is that correct VM-behavior?
67840a4affd1 class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 18290
diff changeset
   142
    "/ One might argue, that the DNU should be also directed 
67840a4affd1 class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 18290
diff changeset
   143
    "/ (or else add the searchClass information to the Message object)
8657
1df84e8daa15 care for nil suspendedContext in description
penk
parents: 8501
diff changeset
   144
    suspendedContext notNil ifTrue:[
18302
67840a4affd1 class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 18290
diff changeset
   145
        searchClass := suspendedContext searchClass.
18290
5ea0b888d79d class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 16414
diff changeset
   146
        (sender := suspendedContext sender) notNil ifTrue:[
18302
67840a4affd1 class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 18290
diff changeset
   147
            "/ just in case, this gets ever fixed
67840a4affd1 class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 18290
diff changeset
   148
            sender receiver == suspendedContext receiver ifTrue:[
67840a4affd1 class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 18290
diff changeset
   149
                searchClass := sender searchClass.
67840a4affd1 class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 18290
diff changeset
   150
            ].
16414
718569261384 class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 15188
diff changeset
   151
        ].
8657
1df84e8daa15 care for nil suspendedContext in description
penk
parents: 8501
diff changeset
   152
    ].
18302
67840a4affd1 class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 18290
diff changeset
   153
    searchClass isNil ifTrue:[
67840a4affd1 class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 18290
diff changeset
   154
        searchClass := self receiver class.
8501
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   155
    ].
18302
67840a4affd1 class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 18290
diff changeset
   156
    searchClass notNil ifTrue:[
8501
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   157
        "displayString is better than 'cls name',
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   158
         since it appends (obsolete) for outdated classes.
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   159
         (this happens if you send messages to old instances
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   160
          after changing a classes definition)"
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   161
18302
67840a4affd1 class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 18290
diff changeset
   162
        description := searchClass displayString.
10446
21f13f605ff5 changed #description - take care if the classes displayString is not a String
Stefan Vogel <sv@exept.de>
parents: 8657
diff changeset
   163
        description isString ifFalse:[
21f13f605ff5 changed #description - take care if the classes displayString is not a String
Stefan Vogel <sv@exept.de>
parents: 8657
diff changeset
   164
            description := '(** ???-class **)'
21f13f605ff5 changed #description - take care if the classes displayString is not a String
Stefan Vogel <sv@exept.de>
parents: 8657
diff changeset
   165
        ].
8501
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   166
    ] ifFalse:[    
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   167
        description := '(** nil-class **)'
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   168
    ].
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   169
    sel := self selector.
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   170
    sel class == Symbol ifTrue:[
13028
2fdfcae3cf1d changed: #description
Claus Gittinger <cg@exept.de>
parents: 10446
diff changeset
   171
        description := description , ' does not understand: ' , sel storeString.
8501
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   172
        "/ description := sel, ' not understood by ' ,  description.
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   173
    ] ifFalse:[
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   174
        "a non-symbol selector may happen when things go mad in a primitive, 
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   175
         or a method has been called by #perform: or #valueWithReceiver: with a wrong arg."
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   176
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   177
        description := description , ' does not understand nonSymbol: ' , sel printString.
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   178
        "/ description := sel printString, ' (nonSymbol) not understood by ' ,  description.
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   179
    ].
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   180
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   181
    ^ description
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   182
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   183
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   184
    "
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   185
        2 foo:3
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   186
        2 perform:55
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   187
        nil // 2
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   188
    "
13028
2fdfcae3cf1d changed: #description
Claus Gittinger <cg@exept.de>
parents: 10446
diff changeset
   189
2fdfcae3cf1d changed: #description
Claus Gittinger <cg@exept.de>
parents: 10446
diff changeset
   190
    "Modified: / 19-08-2010 / 15:33:03 / cg"
8501
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   191
! !
8e114640aa5c Speed up MessageNotUnderstood exception sending by layz computation
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
   192
5976
4596197c1e0d initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   193
!MessageNotUnderstood class methodsFor:'documentation'!
4596197c1e0d initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   194
4596197c1e0d initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
version
20447
4b8519e42c13 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18302
diff changeset
   196
    ^ '$Header$'
13028
2fdfcae3cf1d changed: #description
Claus Gittinger <cg@exept.de>
parents: 10446
diff changeset
   197
!
2fdfcae3cf1d changed: #description
Claus Gittinger <cg@exept.de>
parents: 10446
diff changeset
   198
2fdfcae3cf1d changed: #description
Claus Gittinger <cg@exept.de>
parents: 10446
diff changeset
   199
version_CVS
20447
4b8519e42c13 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18302
diff changeset
   200
    ^ '$Header$'
5976
4596197c1e0d initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
! !
15188
e1937381139c class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
   202
e1937381139c class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
   203
e1937381139c class: MessageNotUnderstood
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
   204
MessageNotUnderstood initialize!