#FEATURE by cg
class: ProjectDefinition class
added: #reasonForNotSupportedOnPlatform
comment/format in: #loadMandatoryPreRequisitesAsAutoloaded:
changed: #checkForLoad
--- a/ProjectDefinition.st Wed Feb 06 21:36:28 2019 +0100
+++ b/ProjectDefinition.st Thu Feb 07 14:26:23 2019 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 2006 by eXept Software AG
All Rights Reserved
@@ -5575,11 +5577,13 @@
"raise an error, if the package is not suitable for loading"
self supportedOnPlatform ifFalse:[
- PackageNotCompatibleError raiseRequestWith:self package.
+ PackageNotCompatibleError
+ raiseRequestWith:self package
+ errorString:(self reasonForNotSupportedOnPlatform)
].
"Modified (comment): / 24-02-2017 / 10:06:44 / cg"
- "Modified: / 05-12-2018 / 10:28:21 / Claus Gittinger"
+ "Modified: / 07-02-2019 / 14:25:31 / Claus Gittinger"
!
ensureFullyLoaded
@@ -6910,17 +6914,17 @@
|prereq|
- self supportedOnPlatform ifFalse:[
- ^ self
- ].
+ self supportedOnPlatform ifFalse:[^ self].
prereq := self effectiveMandatoryPreRequisites.
prereq notEmpty ifTrue:[
- Verbose ifTrue:[
- Transcript showCR:(' %1 loading mandatory prerequisites...' bindWith:self name).
- ].
- self loadPackages:prereq asAutoloaded:asAutoloaded
- ].
+ Verbose ifTrue:[
+ Transcript showCR:(' %1 loading mandatory prerequisites...' bindWith:self name).
+ ].
+ self loadPackages:prereq asAutoloaded:asAutoloaded
+ ].
+
+ "Modified (format): / 07-02-2019 / 14:23:00 / Claus Gittinger"
!
loadPackages:aListOfPackages asAutoloaded:asAutoloaded
@@ -8103,6 +8107,15 @@
^ self subclassResponsibility
!
+reasonForNotSupportedOnPlatform
+ "answer a reason string, why the package is not supported on this platform
+ (if it is not, i.e. if supportedByPlatform returns false)"
+
+ ^ 'not supported by this OS-platform'
+
+ "Created: / 07-02-2019 / 14:21:54 / Claus Gittinger"
+!
+
supportedOnPlatform
"answer false, if this package is not suitable for
the current platform. The default here returns true.