Cairo__CError.st
changeset 43 1006839761af
child 72 3eabcca278cd
equal deleted inserted replaced
42:475e93b10c8f 43:1006839761af
       
     1 "{ Package: 'stx:goodies/libcairo' }"
       
     2 
       
     3 "{ NameSpace: Cairo }"
       
     4 
       
     5 Error subclass:#CError
       
     6 	instanceVariableNames:''
       
     7 	classVariableNames:''
       
     8 	poolDictionaries:''
       
     9 	category:'Cairo-Exceptions'
       
    10 !
       
    11 
       
    12 !CError methodsFor:'printing & storing'!
       
    13 
       
    14 description
       
    15     "return the description string of the signal"
       
    16 
       
    17     parameter isInteger ifTrue:[ 
       
    18         messageText isNil ifTrue:[ 
       
    19             ^ CPrimitives cairo_status_to_string: parameter.
       
    20         ].
       
    21         ^ messageText , ': ' , (CPrimitives cairo_status_to_string: parameter).
       
    22     ].
       
    23     ^ super description
       
    24 
       
    25     "
       
    26       (CError new parameter: 1) description
       
    27       (CError new messageText: 'Failed to create Cairo'; parameter: 1) description
       
    28       (CError new messageText: 'Failed to create Cairo') description
       
    29     "
       
    30 
       
    31     "Created: / 23-02-2016 / 16:52:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    32 ! !
       
    33