core/MetacelloVersionDoesNotExistError.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Tue, 18 Sep 2012 18:24:44 +0000
changeset 16 25ac697dc747
parent 14 f01fe37493e9
permissions -rw-r--r--
- Updated from branch master

"{ Package: 'stx:goodies/metacello/core' }"

Error subclass:#MetacelloVersionDoesNotExistError
	instanceVariableNames:'project versionString'
	classVariableNames:''
	poolDictionaries:''
	category:'Metacello-Core-Exceptions-Errors'
!


!MetacelloVersionDoesNotExistError class methodsFor:'instance creation'!

project: aMetacelloProject versionString: aVersionString

	^(self new)
		project: aMetacelloProject;
		versionString: aVersionString;
		yourself
! !

!MetacelloVersionDoesNotExistError methodsFor:'accessing'!

possibleVersions
    ^ self project symbolicVersionSymbols , (self project versions collect: [ :each | each versionString ])
!

project
	^ project
!

project: anObject
	project := anObject
!

versionString
	^ versionString
!

versionString: anObject
	versionString := anObject
! !

!MetacelloVersionDoesNotExistError methodsFor:'printing'!

description
    "Return a textual description of the exception."

    ^ 'Version ' , self versionString printString , ' is not defined in ' , self project label
        , '. Possible versions include: ' , self possibleVersions printString
! !

!MetacelloVersionDoesNotExistError class methodsFor:'documentation'!

version_SVN
    ^ '$Id::                                                                                                                        $'
! !