Skip to content

Commit 3430d94

Browse files
committed
Removed panic exception from BaseHandle since it makes semantically no sense since optionals are used. It also caused problems in ROS2 mesh layer applications
1 parent b205965 commit 3430d94

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

include/lvr2/util/BaseHandle.hpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,10 @@ class BaseOptionalHandle : public BaseHandle
9393
}
9494

9595
/**
96-
* @brief Extracts the handle. If `this` doesn't hold a handle (is "None"),
97-
* this method panics.
96+
* @brief Extracts the handle.
9897
*/
9998
NonOptionalT unwrap() const
10099
{
101-
if (!is_valid())
102-
{
103-
panic("Tried to unwrap invalid handle!");
104-
}
105100
return NonOptionalT(BaseHandle::idx());
106101
}
107102
};

0 commit comments

Comments
 (0)