JavaResolver.st
branchdevelopment
changeset 3017 6d6f9fd894f7
parent 2942 c39cbf09ea3d
--- a/JavaResolver.st	Sun Feb 09 17:15:54 2014 +0100
+++ b/JavaResolver.st	Mon Feb 10 00:12:30 2014 +0100
@@ -324,6 +324,12 @@
     "Modified: / 13-04-2011 / 14:07:57 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
+throwNoSuchFieldException: msg
+    exceptionThrower throwNoSuchFieldException: msg.
+
+    "Created: / 09-02-2014 / 23:09:37 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
+!
+
 throwNoSuchMethodError
     exceptionThrower throwNoSuchMethodError.
 
@@ -341,7 +347,8 @@
     class := aJavaFieldRef classRef resolve: false.
     class ifNil: [ self error: 'should not happen - tell mh' ].
     result := class lookupFieldByNameAndType: aJavaFieldRef nameAndType.
-    result ifNil: [ self throwNoSuchFieldException ].
+    result ifNil: [ self throwNoSuchFieldException: 
+        'No field named ' , aJavaFieldRef nameAndType printString , ' in ' , class name ].
     (self 
         checkPermissionsForField: result
         from: aJavaFieldRef classRef owner
@@ -379,6 +386,7 @@
 
     "Created: / 11-04-2011 / 21:15:20 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
     "Modified: / 01-12-2012 / 13:45:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+    "Modified: / 09-02-2014 / 23:10:22 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
 !
 
 resolveStaticFieldIndentifiedByRef: aJavaFieldRef