Closed akabla closed 3 years ago
We deal with many errors in parameters with an @assert macro. For instance: @assert hastime(d) "Data without time information cannot be resampled."
@assert
@assert hastime(d) "Data without time information cannot be resampled."
@assert may be disabled with certain optimisations, and therefore not appropriate for this usage. https://docs.julialang.org/en/v1/base/base/#Base.@assert
It would be more appropriate to reserve @assert for debugging purposes only, and use proper exceptions for error message supposed to be helpful to the user.
This page may be useful: https://scls.gitbooks.io/ljthw/content/_chapters/11-ex8.html
Important issue, but I think this is duplicated:
https://github.com/JuliaRheology/RHEOS.jl/issues/81
indeed! let me close this here - no need to have it twice.
We deal with many errors in parameters with an
@assert
macro. For instance:@assert hastime(d) "Data without time information cannot be resampled."
@assert
may be disabled with certain optimisations, and therefore not appropriate for this usage. https://docs.julialang.org/en/v1/base/base/#Base.@assertIt would be more appropriate to reserve
@assert
for debugging purposes only, and use proper exceptions for error message supposed to be helpful to the user.This page may be useful: https://scls.gitbooks.io/ljthw/content/_chapters/11-ex8.html