Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ecl_debug_catch fails in release #7

Open
stonier opened this Issue Dec 6, 2012 · 3 comments

Comments

Projects
None yet
2 participants
@stonier
Copy link
Owner

stonier commented Dec 6, 2012

ecl_debug_try {
    // something
ecl_debug_catch(Exception &e) { 
    std::cout << e.what() << std::endl;
}

is broken in release mode because it doesn't know what e is.

@stonier

This comment has been minimized.

Copy link
Owner Author

stonier commented Apr 2, 2014

This is used liberally through the ycs. Should come up with a solution for it.

@bit-pirate

This comment has been minimized.

Copy link
Contributor

bit-pirate commented Apr 12, 2014

The two cases I found are related with data writes on a "ecl::Serialorftdi::Ftdi` instance and look like this:

ecl::Error PacketHandler::writeData(unsigned char *buff, unsigned long size_buff)
{
  ecl::Error error = ecl::NoError;
  if (device != NULL)
  {
    ecl_debug_try
    {
      if (device->write(buff, size_buff) == -1)
      {
        error = device->error(); // release mode and there is no exceptions, we land here.
      }
    }
    ecl_debug_catch (const ecl::StandardException &e){
      error = e.flag();
    }
  }
  else
  {
    error = ecl::NotInitialisedError;
  }
  return error;
}

I guess, it would be okay to just remove the exception handling until this gets properly fixed. Thoughts?

@stonier

This comment has been minimized.

Copy link
Owner Author

stonier commented Apr 13, 2014

Sounds good to me - I still can't think of a way around this.

@stonier stonier modified the milestones: ToDo, Version 0.6.0 Sep 12, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.