UnhandledAttributeInLiteralArrayErrorSignal.st
author Jan Vrany <jan.vrany@labware.com>
Wed, 22 Mar 2023 13:57:18 +0000
branchjv
changeset 25445 1623217d2268
parent 19798 4a40d96b81ab
permissions -rw-r--r--
Cherry-picked OrderedCollection.st from 0b286fd51da7: * d4c86d7c0bfc: #TUNING by stefan, Stefan Vogel <sv@exept.de> * 692b6497a669: #DOCUMENTATION by stefan, Stefan Vogel <sv@exept.de> * d47bb2912953: #DOCUMENTATION by stefan, Stefan Vogel <sv@exept.de> * abb4316c6bff: #FEATURE by cg, Claus Gittinger <cg@exept.de> * 3a8fce0e8d11: #TUNING by stefan, Stefan Vogel <sv@exept.de> * 03d29bf8c5bb: #REFACTORING by stefan, Stefan Vogel <sv@exept.de> * cccc6c4abcfc: #REFACTORING by stefan, Stefan Vogel <sv@exept.de> * 35d957c7a840: #FEATURE by cg, Claus Gittinger <cg@exept.de> * 6b11890f5f2c: #OTHER by cg, Claus Gittinger <cg@exept.de> * abb6108fb06b: #FEATURE by cg, Claus Gittinger <cg@exept.de> * 2c4768bb2e89: #FEATURE by cg, Claus Gittinger <cg@exept.de> * 4029e964d0f1: #FEATURE by cg, Claus Gittinger <cg@exept.de> * ddcab3a9c2df: #OTHER by cg, Claus Gittinger <cg@exept.de> * 2213eb56e0c7: #REFACTORING by exept, Claus Gittinger <cg@exept.de> * 09ca874a6160: #REFACTORING by exept, Claus Gittinger <cg@exept.de> * 30b332af1f33: #BUGFIX by stefan, Stefan Vogel <sv@exept.de> * 779764ba117b: #REFACTORING by cg, Claus Gittinger <cg@exept.de> * b3d232a613c9: #BUGFIX by stefan, Stefan Vogel <sv@exept.de> * c417f7edaec1: #BUGFIX by stefan, Stefan Vogel <sv@exept.de> * 904b6538f379: #FEATURE by exept, Claus Gittinger <cg@exept.de> * c5887f03e01f: #REFACTORING by stefan, Stefan Vogel <sv@exept.de> * 8912d03aff48: #BUGFIX by exept, Claus Gittinger <cg@exept.de> * de5cd1dab4c3: #DOCUMENTATION by exept, Claus Gittinger <cg@exept.de> * 9bbd26603378: #OTHER by exept, Claus Gittinger <cg@exept.de> * c2c9dc110f42: #FEATURE by stefan, Stefan Vogel <sv@exept.de> * 81d123c6703d: #DOCUMENTATION by stefan, Stefan Vogel <sv@exept.de> * 8aadbb21458a: #BUGFIX by stefan, Stefan Vogel <sv@exept.de> * f210dbb8b2f6: #TUNING by stefan, Stefan Vogel <sv@exept.de> * c2c774fc53c0: #FEATURE by exept, Claus Gittinger <cg@exept.de> * b6f462670875: #DOCUMENTATION by exept, Claus Gittinger <cg@exept.de> * 27ae4021d5d6: #FEATURE by stefan, Stefan Vogel <sv@exept.de> * 10d9e9d85594: #TUNING by exept, Claus Gittinger <cg@exept.de> * 2653d855dcc7: #DOCUMENTATION by exept, Claus Gittinger <cg@exept.de> * 6ea1698a1a34: #FEATURE by stefan, Stefan Vogel <sv@exept.de> * 28762315e664: #OTHER by exept, Claus Gittinger <cg@exept.de> * 7142ea786f3e: #TUNING by stefan, Stefan Vogel <sv@exept.de> * 7875acb42b53: #BUGFIX by stefan, Stefan Vogel <sv@exept.de> * 163a0eebc97e: #BUGFIX by Maren, matilk
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
19793
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
 COPYRIGHT (c) 2016 by eXept Software AG
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
              All Rights Reserved
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
 This software is furnished under a license and may be used
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
 hereby transferred.
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
"
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
"{ Package: 'stx:libbasic' }"
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
"{ NameSpace: Smalltalk }"
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
Notification subclass:#UnhandledAttributeInLiteralArrayErrorSignal
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	instanceVariableNames:'badLiteralArray'
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	classVariableNames:''
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
	poolDictionaries:''
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
	category:'Kernel-Exceptions-Errors'
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
!
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
!UnhandledAttributeInLiteralArrayErrorSignal class methodsFor:'documentation'!
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
copyright
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
"
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
 COPYRIGHT (c) 2016 by eXept Software AG
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
              All Rights Reserved
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
 This software is furnished under a license and may be used
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
 only in accordance with the terms of that license and with the
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 inclusion of the above copyright notice.   This software may not
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
 be provided or otherwise made available to, or used by, any
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
 other person.  No title to or ownership of the software is
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
 hereby transferred.
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
"
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
!
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
documentation
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
"
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
    notifying when decoding a literal array spec,
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
    when a non-existing attribute is encountered.
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
    i.e. a spec-element of the form 
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
        (Foo attribute: x),
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
    where atribute is unknown to the Foo class (at cannot decode that)
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
    (used to be an errorPrint in basicFromLiteralArrayEncoding).
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
    
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
        |spec1 spec2|
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
        UnhandledAttributeInLiteralArrayErrorSignal handle:[:ex |
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
            Transcript showCR:ex description
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
        ] do:[
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
            spec1 := #(#UISpecification #activeHelpKey: #foo) decodeAsLiteralArray.
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
            spec2 := #(#UISpecification #blabla: #foo) decodeAsLiteralArray.
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
        ].
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
        Transcript showCR:spec1.
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
        Transcript showCR:spec2.
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
    
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
    [author:]
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
        cg
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
"
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
! !
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
!UnhandledAttributeInLiteralArrayErrorSignal class methodsFor:'initialization'!
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
initialize
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
    NotifierString := 'unhandled literalArrayEncoding attribute: '.
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
    "
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
    self handle:[:ex |
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
        Transcript showCR:ex 
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
    ] do:[    
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
    self raiseWith:'bla'
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
    ].
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
    "
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
! !
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
!UnhandledAttributeInLiteralArrayErrorSignal methodsFor:'accessing'!
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
badLiteralArray
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
    "the literal array containing the unhandled attribute"
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
    
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
    ^ badLiteralArray
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
!
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
badLiteralArray:something
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
    badLiteralArray := something.
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
!
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
unhandledAttribute
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
    "the unhandled attribute"
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
    
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
    ^ parameter
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
! !
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
!UnhandledAttributeInLiteralArrayErrorSignal methodsFor:'printing & storing'!
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
description
19798
4a40d96b81ab #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 19793
diff changeset
   100
    ^ super description, ' (', parameter printString,')'
19793
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
! !
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
!UnhandledAttributeInLiteralArrayErrorSignal class methodsFor:'documentation'!
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
version
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
    ^ '$Header$'
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   107
!
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   109
version_CVS
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
    ^ '$Header$'
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
! !
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   112
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
a17c9785f4c7 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
UnhandledAttributeInLiteralArrayErrorSignal initialize!