FidoProject / Fido

A lightweight C++ machine learning library for embedded electronics and robotics.
http://fidoproject.github.io/
MIT License
439 stars 81 forks source link

Poor error handling #49

Closed joshuagruenstein closed 8 years ago

joshuagruenstein commented 8 years ago

Errors are handled by throwing 1 and printing the message with std::cout. This should instead use std::runtime_exception.

truell20 commented 8 years ago

std::runtime_exception should not be used since we are moving away from the standard library since it isnt really supported on microcontrollers.

truell20 commented 8 years ago

We could use a preprocessor directive to check for the existence of exceptions and throw them if they exist?

truell20 commented 8 years ago

@joshuagruenstein @FlyingGraysons: @Sydriax suggested using assert instead of std::runtime_exception or throw. It is C code, so will be available on microcontrollers. Right?

truell20 commented 8 years ago

Fixed in 65d4f8c63ad57d9bd68a13962fb5a341580f65d9