packages/PackageError.st
author Claus Gittinger <cg@exept.de>
Thu, 14 Jun 2018 17:02:40 +0200
changeset 4329 f1a534377d1e
parent 1444 b48e0dc3740e
child 3011 1997ff6e7e55
permissions -rw-r--r--
#UI_ENHANCEMENT by cg class: SourceCodeManagerUtilities class definition changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation: optout the "only version methods are different..." dialog
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1444
b48e0dc3740e copyright
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
     1
"
b48e0dc3740e copyright
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
     2
 COPYRIGHT (c) 2003 by eXept Software AG
b48e0dc3740e copyright
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
     3
              All Rights Reserved
b48e0dc3740e copyright
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
     4
b48e0dc3740e copyright
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
     5
 This software is furnished under a license and may be used
b48e0dc3740e copyright
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
     6
 only in accordance with the terms of that license and with the
b48e0dc3740e copyright
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
b48e0dc3740e copyright
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
     8
 be provided or otherwise made available to, or used by, any
b48e0dc3740e copyright
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
     9
 other person.  No title to or ownership of the software is
b48e0dc3740e copyright
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
    10
 hereby transferred.
b48e0dc3740e copyright
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
    11
"
b48e0dc3740e copyright
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
    12
1231
2f3a15bfac92 initial checkin
james
parents:
diff changeset
    13
"{ Package: 'stx:libbasic3' }"
2f3a15bfac92 initial checkin
james
parents:
diff changeset
    14
2f3a15bfac92 initial checkin
james
parents:
diff changeset
    15
"{ NameSpace: Packages }"
2f3a15bfac92 initial checkin
james
parents:
diff changeset
    16
2f3a15bfac92 initial checkin
james
parents:
diff changeset
    17
Error subclass:#PackageError
2f3a15bfac92 initial checkin
james
parents:
diff changeset
    18
	instanceVariableNames:''
2f3a15bfac92 initial checkin
james
parents:
diff changeset
    19
	classVariableNames:''
2f3a15bfac92 initial checkin
james
parents:
diff changeset
    20
	poolDictionaries:''
2f3a15bfac92 initial checkin
james
parents:
diff changeset
    21
	category:'Package-Exception-Errors'
2f3a15bfac92 initial checkin
james
parents:
diff changeset
    22
!
2f3a15bfac92 initial checkin
james
parents:
diff changeset
    23
1444
b48e0dc3740e copyright
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
    24
!PackageError class methodsFor:'documentation'!
b48e0dc3740e copyright
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
    25
b48e0dc3740e copyright
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
    26
copyright
b48e0dc3740e copyright
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
    27
"
b48e0dc3740e copyright
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
    28
 COPYRIGHT (c) 2003 by eXept Software AG
b48e0dc3740e copyright
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
    29
              All Rights Reserved
b48e0dc3740e copyright
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
    30
b48e0dc3740e copyright
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
    31
 This software is furnished under a license and may be used
b48e0dc3740e copyright
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
    32
 only in accordance with the terms of that license and with the
b48e0dc3740e copyright
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
    33
 inclusion of the above copyright notice.   This software may not
b48e0dc3740e copyright
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
    34
 be provided or otherwise made available to, or used by, any
b48e0dc3740e copyright
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
    35
 other person.  No title to or ownership of the software is
b48e0dc3740e copyright
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
    36
 hereby transferred.
b48e0dc3740e copyright
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
    37
"
b48e0dc3740e copyright
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
    38
! !
1231
2f3a15bfac92 initial checkin
james
parents:
diff changeset
    39
1268
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    40
!PackageError class methodsFor:'factory'!
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    41
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    42
invalidClassMoveError
1269
0a0e553af4c7 No change since last time... just testing something
james
parents: 1268
diff changeset
    43
    "dummy method     "
1268
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    44
!
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    45
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    46
overrideClassError
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    47
    "dummy method"
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    48
!
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    49
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    50
removeClassError
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    51
    "return another error class am returning self here!!"
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    52
! !
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    53
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    54
!PackageError class methodsFor:'raising'!
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    55
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    56
raiseAddedClassFailedNamed:aClassName toPackage:newPackage
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    57
    ^ (self new) 
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    58
            errorString:'Cannot add ', aClassName, ' to package named: ',newPackage name, ' as it includes
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    59
            a class with the same name!!';
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    60
            raise.
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    61
!
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    62
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    63
raiseCannotAddAsPackageManagerAlreadyIncludesPackageNamed:aString
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    64
    ^ (self new) 
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    65
            errorString:'Cannot add as packageManager already includes package named ', aString;
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    66
            raise.
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    67
!
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    68
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    69
raiseCannotMoveClassNamed:aClassName toPackage:newOwnerPackage
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    70
    ^ (self new) 
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    71
            errorString:'Cannot move class named ', aClassName asString, ' from package ', newOwnerPackage name;
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    72
            raise.
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    73
!
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    74
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    75
raiseCannotRemoveClassNamed:aSymbol fromPackage:aPackage
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    76
    ^ (self new) 
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    77
            errorString:'Cannot removeClassNamed ', aSymbol asString, ' from package ', aPackage name;
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    78
            raise.
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    79
!
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    80
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    81
raiseCannotRemoveClassNamed:aClassName fromPackage:aPackage inContext:aContext
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    82
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    83
    ^ (self removeClassError new) 
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    84
            errorString:'Cannot remove packagedClass ', aClassName asString,
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    85
                ' from package: ';
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    86
"/            fromPackage:aPackage;
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    87
"/            context:aContext;
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    88
            raise.
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    89
!
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    90
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    91
raiseInvalidClassMove:aClass fromPackage:oldOwnerPackage toPackage:newOwnerPackage
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    92
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    93
    ^ (self invalidClassMoveError new) 
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    94
            errorString:'Cannot move packagedClass ', aClass name asString;
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    95
            raise.
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    96
!
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    97
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    98
raiseWithOverrideClassErrorClassNotFound:classBeingOverriddenName fromPackage:aPackage
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
    99
    ^ (self removeClassError new) 
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
   100
            errorString:'Class not found  ', classBeingOverriddenName  asString,
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
   101
                ' from package: ' , aPackage name;
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
   102
"/            fromPackage:aPackage;
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
   103
"/            context:aContext;
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
   104
            raise.
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
   105
!
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
   106
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
   107
raiseWithOverrideMethodErrorMethodNotFound:methodBeingOverridden fromPackage:aPackage
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
   108
    ^ (self new) raise.
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
   109
! !
9dc8d1b8ce9b Lots and lots of changes...
james
parents: 1231
diff changeset
   110
1231
2f3a15bfac92 initial checkin
james
parents:
diff changeset
   111
!PackageError class methodsFor:'documentation'!
2f3a15bfac92 initial checkin
james
parents:
diff changeset
   112
2f3a15bfac92 initial checkin
james
parents:
diff changeset
   113
version
1444
b48e0dc3740e copyright
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
   114
    ^ '$Header: /cvs/stx/stx/libbasic3/packages/PackageError.st,v 1.4 2006-01-10 09:29:56 cg Exp $'
1231
2f3a15bfac92 initial checkin
james
parents:
diff changeset
   115
! !