Operating system: Windows-10-10.0.17763 64 Bits
Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 430.86
Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-07-11 13:50, hash: rB06312c6d2db8
Short description of error
visible_get() throws an exception when an object is excluded (via the Collection it belongs to)
Exact steps for others to reproduce the error
Move an object (Cube) to a new collection
Exclude that collection from the View Layer (in the outliner)
In the Python console, run:
D.objects['Cube'].visible_get() # or D.objects['Cube'].visible_get(view_layer=C.view_layer)
It will throw an Exception saying:
RuntimeError: Error: Object 'Cube' not in View Layer 'View Layer'!
The description of visible_get() says "Test if the object is visible in the 3D viewport, taking into account all visibility settings", which it currently doesn't.
Without being able to use visible_get(), you have to catch the exception of either visible_get() or other functions that throw the same exception in the same situation, so your add-on works smoothly.