Tag Info

Hot answers tagged

6

I believe the simplest change to your code is to replace the Return[$Failed] expressions with Sets that restore the default values of the options: ClearAll[func] Options[func] = {Method -> Automatic, WorkingPrecision -> MachinePrecision, Order -> 2}; func::badval = "`1` is not a valid value of option `2`"; func[arg1_, arg2_, opts : ...



Only top voted, non community-wiki answers of a minimum length are eligible