Zulip Chat Archive
Stream: Is there code for X?
Topic: Not-implemented exception?
Tanner Swett (Jul 02 2023 at 03:55):
For cases where I only have a partial implementation of a function, is there something similar to a "throw NotImplementedException" kind of thing I can use to fill in the cases I haven't written yet?
The sorry
notation is pretty close, but I'd like something that can either let me attach a message, or tell me exactly which occurrence is the one that we actually ran into, or both. Also, it would be nice if it worked with #eval
in addition to #reduce
.
Come to think of it, axiom notImplemented.{u} (message : String) {α : Sort u} : α
is workable and it lets me attach a message, but it doesn't pinpoint the relevant occurrence in my code and it doesn't work with #eval
.
Siddhartha Gadgil (Jul 02 2023 at 04:35):
Would panic!
work for you? You get a string of your choice as a message.
Tanner Swett (Jul 03 2023 at 02:01):
Siddhartha Gadgil said:
Would
panic!
work for you? You get a string of your choice as a message.
It looks like that works for #eval
, but not for #reduce
or other commands that work similarly.
Last updated: Dec 20 2023 at 11:08 UTC