Now obviously this is a made up example and stuff like that never happens in real life, right?
Well... pick any OCC method with a few overloads and call it wrong with cq's OCP package, OCP will helpfully list the overloads on multiple line in the exception message.
from OCP.ShapeExtend import ShapeExtend_WireData
ShapeExtend_WireData().Add("blah")
Traceback (most recent call last):
File "/tmp/err.py", line 2, in <module>
ShapeExtend_WireData().Add("blah")
TypeError: Add(): incompatible function arguments. The following argument types are supported:
1. (self: OCP.ShapeExtend.ShapeExtend_WireData, edge: OCP.TopoDS.TopoDS_Edge, atnum: int = 0) -> None
2. (self: OCP.ShapeExtend.ShapeExtend_WireData, wire: OCP.TopoDS.TopoDS_Wire, atnum: int = 0) -> None
3. (self: OCP.ShapeExtend.ShapeExtend_WireData, wire: OCP.ShapeExtend.ShapeExtend_WireData, atnum: int = 0) -> None
4. (self: OCP.ShapeExtend.ShapeExtend_WireData, shape: OCP.TopoDS.TopoDS_Shape, atnum: int = 0) -> None
Invoked with: <OCP.ShapeExtend.ShapeExtend_WireData object at 0x7f083cb08cb0>, 'blah'
...all of which ends up a single looooooooooooooong line in cq-editor
Maybe there's some Qt options so the widget would clip the text instead of resizing itself?
Or if that's not possible the message should be truncated at an arbitrary length before displaying?
Exceptions with long messages will resize the "Current traceback" panel/widget, and, in turn, resize the whole application window.
Reproduction:
raise ValueError("really "*64 + "long message")
Now obviously this is a made up example and stuff like that never happens in real life, right?
Well... pick any OCC method with a few overloads and call it wrong with cq's
OCP
package,OCP
will helpfully list the overloads on multiple line in the exception message....all of which ends up a single looooooooooooooong line in cq-editor![cq-editor-after-ocp-exc](https://github.com/CadQuery/CQ-editor/assets/489715/9c91efeb-d86e-4b96-bd63-7bca0f3c0808)
Maybe there's some Qt options so the widget would clip the text instead of resizing itself? Or if that's not possible the message should be truncated at an arbitrary length before displaying?