#FEATURE by cg
authorClaus Gittinger <cg@exept.de>
Tue, 18 Dec 2018 15:39:53 +0100
changeset 23569 4e1dba6192e5
parent 23568 3d89374701ba
child 23570 d1014cb93286
#FEATURE by cg class: Object added: #assertNotNil
Object.st
--- a/Object.st	Tue Dec 18 15:39:28 2018 +0100
+++ b/Object.st	Tue Dec 18 15:39:53 2018 +0100
@@ -2307,6 +2307,7 @@
 %}
 ! !
 
+
 !Object methodsFor:'converting'!
 
 -> anObject
@@ -2967,6 +2968,19 @@
     "Modified (comment): / 06-03-2012 / 11:26:48 / cg"
 !
 
+assertNotNil
+    "fail and report an error, if the receiver is nil"
+
+    "/ intentionally left empty
+    ^ self
+
+    "
+     self assertNotNil
+    "
+
+    "Created: / 18-12-2018 / 15:39:28 / Claus Gittinger"
+!
+
 basicInspect
     "{ Pragma: +optSpace }"