Documentation about Exceptions in VIktor Docs

It would be nice that in the documentation along examples of code of classes and functions, we could find the exceptions related to those functions. For example, there is a ValueError exceptions for duplicated points used in a Extrusion (I cant find any place in the documentation that talks about this).

Another exception that i recently found it was that the Storage object cant have keys with more than 64 characters. And again i cant find anywhere in the docs that talks about that restriction (Maybe it is alredy written but i cant find or it is’nt really visible (It should be in yellow or red background that info i think)

Hello @Geomasticer, thank you for your request!

I think I understand your point: when I check the documentation of the Extrusion classes it does not state anywhere that there is an error raised when using duplicate points. The error in your screenshot arises somewhere else (although we get to that somewhere else by starting from the Extrusion): the Polygon class (SDK Reference - Geometry | VIKTOR Documentation). While it does not state directly that an error will be raised when using duplicate points, if you look at the signature (SDK Reference - Geometry | VIKTOR Documentation) you will notice an argument called: skip_duplicate_vertices_check:


I have no experience with it myself, but perhaps if you set that to True you can still use your code as-is. Although I also could imagine the duplicate check is required because in order to draw things on the screen we have to mesh them and then draw triangles over the mesh. If there are duplicate points, the resulting visualisation might not compute. Curious to hear what you find!

On the point of the key length, I check the reference entry for the Storage (SDK Reference - Core | VIKTOR Documentation) and I saw this:


where the 64 character length is mentioned.