Skip to content

Commit

Permalink
Excetions was changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Tamir91 committed Sep 22, 2022
1 parent a7598f4 commit b191e67
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions unit-tests/live/options/test-timestamp-domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ def get_connected_device():
try:
context = rs.context()
dev = context.devices[0]
except:
print('Exception: Failed to find connected device')
except Exception as ex:
print('Exception: Failed to find connected device. ', str(ex))
return dev


Expand Down Expand Up @@ -55,8 +55,8 @@ def start_sensor_test(sensor, global_time_enabled: int):
test.check_equal(frame.get_frame_timestamp_domain(),
rs.timestamp_domain.global_time)

except:
print('Exception: start_depth_sensor_test throw exception with value: ', global_time_enabled)
except Exception as exc:
print(str(exc))


depth_sensor = None
Expand Down Expand Up @@ -108,9 +108,10 @@ def start_sensor_test(sensor, global_time_enabled: int):
start_sensor_test(color_sensor, 1)
test.finish()

except ValueError as v:
print(str(v))
except Exception as e:
print(str(e))
print("The device found has no depth sensor")
print("The device found has no depth sensor or ", str(e))
finally:
# close_resources(depth_sensor)
close_resources(color_sensor)

0 comments on commit b191e67

Please sign in to comment.