开发者

Something like $AssertFunction=Abort[];Message[]

开发者 https://www.devze.com 2023-01-28 10:07 出处:网络
I\'d like to customize the new Assert to print message as it usually does, but to also Abort[] all c开发者_运维知识库omputation. Abort[] part is easy, but how do I generate the same message as the def

I'd like to customize the new Assert to print message as it usually does, but to also Abort[] all c开发者_运维知识库omputation. Abort[] part is easy, but how do I generate the same message as the default?


How about this?

$AssertFunction = (Message[Assert::asrtf, #1]; Abort[]) &
0

精彩评论

暂无评论...
验证码 换一张
取 消