Cairo__CError.st
author Jan Vrany <jan.vrany@labware.com>
Mon, 15 Jun 2020 15:14:31 +0100
changeset 89 2a1c3c0439ea
parent 88 9d51db2ba641
permissions -rw-r--r--
Remove invalid and superfluous `Cairo::CObject class >> fromExternalObject:`

"
stx:goodies/libcairo - Cairo graphics bindings for Smalltalk/X

Copyright (C) 2008-2019 Jan Vrany

This code is licensed under Creative Commons Attribution-NonCommercial License.
For full text of the license, see file LICENSE.txt
"
"{ Package: 'stx:goodies/libcairo' }"

"{ NameSpace: Cairo }"

Error subclass:#CError
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'Cairo-Exceptions'
!

!CError class methodsFor:'documentation'!

copyright
"
stx:goodies/libcairo - Cairo graphics bindings for Smalltalk/X

Copyright (C) 2008-2019 Jan Vrany

This code is licensed under Creative Commons Attribution-NonCommercial License.
For full text of the license, see file LICENSE.txt
"
! !

!CError methodsFor:'printing & storing'!

description
    "return the description string of the signal"

    parameter isInteger ifTrue:[ 
        messageText isNil ifTrue:[ 
            ^ CPrimitives cairo_status_to_string: parameter.
        ].
        ^ messageText , ': ' , (CPrimitives cairo_status_to_string: parameter).
    ].
    ^ super description

    "
      (CError new parameter: 1) description
      (CError new messageText: 'Failed to create Cairo'; parameter: 1) description
      (CError new messageText: 'Failed to create Cairo') description
    "

    "Created: / 23-02-2016 / 16:52:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!CError class methodsFor:'documentation'!

version_HG

    ^ '$Changeset: <not expanded> $'
! !