Skip to content

Use modern C++ features for improved error handling #10

@Sohlar

Description

@Sohlar

Current codebase uses an older style of error handling, via the errno flag and custom exception classes. It doesn't provide the level of felxibility that modern error handling techniques offer.

To improve the error handling, I propose updating the 'func_atan' function (as an exampel) to use modern C++ features.

I suggest we:

  1. Replace the throw_eval_exception and the MATH_ERROR exception class with std::domain_error
  2. Replace if (errno) with std::isnan()

This requires:
Adding (#include 'cmath' , #include 'stdexcept') header files to funcs.cpp

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions