farhadrclass / KnetNLPModelsProblems.jl

MIT License
1 stars 1 forks source link

Throw `DomainError` with custom error message for each parameter inside constructor. #22

Closed MonssafToukal closed 1 year ago

MonssafToukal commented 1 year ago

https://github.com/farhadrclass/KnetNLPModelsProblems.jl/blob/65a606f26e578702b7e3a3a0ebf3eb9fb98acce0/src/solver_pram.jl#L33-L42

Maybe we can do something like this:

throw(DomainError("value $(new_value) should be in domain"))

farhadrclass commented 1 year ago

thanks , I updated the code