Error reading Location object during event handler

I have a simple contact switch handler and I’m trying to log the location information using this instruction:

log.debug "$evt.location.name is the location"

The result is this error:

java.lang.SecurityException: Getting properties on class physicalgraph.location.Location is not allowed @ line 48

Any idea what this is about or how to get around it?

location object will be present without the evt… so $location.name should do it…

1 Like

Thanks for the quick response. Yes, that worked. Seems like the evt.location should have worked as well. Perhaps a bug?

It took me a good hour to work through the same problem. @scd8418 You’re right, as evt.location returns a ‘Location’ type, ‘evt.location.name’ should be valid, as .name is a valid method within the ‘Location’ class.

Is there anyone from Samsung we can contact to get this confirmed? I’m new to the community, so not sure who to tag.

@jim or @slagle should be able to help.

1 Like