PrimitiveFailure.st
author Stefan Vogel <sv@exept.de>
Tue, 08 Nov 2005 12:10:37 +0100
changeset 8974 a2cb4cf6fe7c
parent 8674 3ec5889b8251
child 15187 6b6bc1d5f281
child 17711 39faaaf888b4
permissions -rw-r--r--
do not fail in #description, if there is no message in parameter
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7586
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7232
diff changeset
     1
"
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7232
diff changeset
     2
 COPYRIGHT (c) 2001 by eXept Software AG
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7232
diff changeset
     3
              All Rights Reserved
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7232
diff changeset
     4
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7232
diff changeset
     5
 This software is furnished under a license and may be used
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7232
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: 7232
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7232
diff changeset
     8
 be provided or otherwise made available to, or used by, any
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7232
diff changeset
     9
 other person.  No title to or ownership of the software is
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7232
diff changeset
    10
 hereby transferred.
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7232
diff changeset
    11
"
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7232
diff changeset
    12
5999
05fbf8ac4eb0 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
"{ Package: 'stx:libbasic' }"
05fbf8ac4eb0 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
8328
08bf52d8a022 Convert more instance based exceptions to class based exceptions
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
    15
ExecutionError subclass:#PrimitiveFailure
5999
05fbf8ac4eb0 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
	instanceVariableNames:''
05fbf8ac4eb0 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	classVariableNames:''
05fbf8ac4eb0 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	poolDictionaries:''
8328
08bf52d8a022 Convert more instance based exceptions to class based exceptions
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
    19
	category:'Kernel-Exceptions-ExecutionErrors'
5999
05fbf8ac4eb0 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
!
05fbf8ac4eb0 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
6210
d7039e2ae776 caetgory change and documentation added
Claus Gittinger <cg@exept.de>
parents: 5999
diff changeset
    22
!PrimitiveFailure class methodsFor:'documentation'!
d7039e2ae776 caetgory change and documentation added
Claus Gittinger <cg@exept.de>
parents: 5999
diff changeset
    23
7586
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7232
diff changeset
    24
copyright
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7232
diff changeset
    25
"
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7232
diff changeset
    26
 COPYRIGHT (c) 2001 by eXept Software AG
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7232
diff changeset
    27
              All Rights Reserved
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7232
diff changeset
    28
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7232
diff changeset
    29
 This software is furnished under a license and may be used
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7232
diff changeset
    30
 only in accordance with the terms of that license and with the
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7232
diff changeset
    31
 inclusion of the above copyright notice.   This software may not
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7232
diff changeset
    32
 be provided or otherwise made available to, or used by, any
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7232
diff changeset
    33
 other person.  No title to or ownership of the software is
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7232
diff changeset
    34
 hereby transferred.
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7232
diff changeset
    35
"
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7232
diff changeset
    36
!
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7232
diff changeset
    37
6210
d7039e2ae776 caetgory change and documentation added
Claus Gittinger <cg@exept.de>
parents: 5999
diff changeset
    38
documentation
d7039e2ae776 caetgory change and documentation added
Claus Gittinger <cg@exept.de>
parents: 5999
diff changeset
    39
"
7232
1d05a293b8b0 comments
Claus Gittinger <cg@exept.de>
parents: 6210
diff changeset
    40
    Raised when a primitive C-code method failed to perform its operation
6210
d7039e2ae776 caetgory change and documentation added
Claus Gittinger <cg@exept.de>
parents: 5999
diff changeset
    41
    Typically, raised with bad arguments.
8328
08bf52d8a022 Convert more instance based exceptions to class based exceptions
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
    42
08bf52d8a022 Convert more instance based exceptions to class based exceptions
Stefan Vogel <sv@exept.de>
parents: 7586
diff changeset
    43
    The parameter is the message that triggered the error.
6210
d7039e2ae776 caetgory change and documentation added
Claus Gittinger <cg@exept.de>
parents: 5999
diff changeset
    44
"
d7039e2ae776 caetgory change and documentation added
Claus Gittinger <cg@exept.de>
parents: 5999
diff changeset
    45
! !
5999
05fbf8ac4eb0 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
8674
3ec5889b8251 More verbose description
Stefan Vogel <sv@exept.de>
parents: 8328
diff changeset
    47
!PrimitiveFailure methodsFor:'printing & storing'!
3ec5889b8251 More verbose description
Stefan Vogel <sv@exept.de>
parents: 8328
diff changeset
    48
3ec5889b8251 More verbose description
Stefan Vogel <sv@exept.de>
parents: 8328
diff changeset
    49
description
3ec5889b8251 More verbose description
Stefan Vogel <sv@exept.de>
parents: 8328
diff changeset
    50
8974
a2cb4cf6fe7c do not fail in #description, if there is no message in parameter
Stefan Vogel <sv@exept.de>
parents: 8674
diff changeset
    51
    |desc|
a2cb4cf6fe7c do not fail in #description, if there is no message in parameter
Stefan Vogel <sv@exept.de>
parents: 8674
diff changeset
    52
a2cb4cf6fe7c do not fail in #description, if there is no message in parameter
Stefan Vogel <sv@exept.de>
parents: 8674
diff changeset
    53
    desc := super description, ': ', originator printString.
a2cb4cf6fe7c do not fail in #description, if there is no message in parameter
Stefan Vogel <sv@exept.de>
parents: 8674
diff changeset
    54
    parameter notNil ifTrue:[
a2cb4cf6fe7c do not fail in #description, if there is no message in parameter
Stefan Vogel <sv@exept.de>
parents: 8674
diff changeset
    55
        desc := desc, '>>', parameter selector printString
a2cb4cf6fe7c do not fail in #description, if there is no message in parameter
Stefan Vogel <sv@exept.de>
parents: 8674
diff changeset
    56
    ].
a2cb4cf6fe7c do not fail in #description, if there is no message in parameter
Stefan Vogel <sv@exept.de>
parents: 8674
diff changeset
    57
    ^ desc
8674
3ec5889b8251 More verbose description
Stefan Vogel <sv@exept.de>
parents: 8328
diff changeset
    58
! !
3ec5889b8251 More verbose description
Stefan Vogel <sv@exept.de>
parents: 8328
diff changeset
    59
5999
05fbf8ac4eb0 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
!PrimitiveFailure class methodsFor:'documentation'!
05fbf8ac4eb0 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
05fbf8ac4eb0 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
version
8974
a2cb4cf6fe7c do not fail in #description, if there is no message in parameter
Stefan Vogel <sv@exept.de>
parents: 8674
diff changeset
    63
    ^ '$Header: /cvs/stx/stx/libbasic/PrimitiveFailure.st,v 1.7 2005-11-08 11:10:37 stefan Exp $'
5999
05fbf8ac4eb0 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
! !