ext/rs_232/windows/Port.c in rs_232-3.0.0.pre2 vs ext/rs_232/windows/Port.c in rs_232-3.0.0.pre3

- old
+ new

@@ -75,11 +75,11 @@ void updateSettings(PortDescriptor *port) { if (PORT_OPEN != port->status) - rb_raise(rb_eRuntimeError, "Can not set due to comport is not open, status: %d\n", port->status); + rb_raise(rb_eIOError, "Can not set due to comport is not open, status: %d\n", port->status); if (port->toBeUpdated & T_BaudRate) port->commConfig.dcb.BaudRate = port->settings.BaudRate; @@ -228,10 +228,10 @@ if (port->fd == INVALID_HANDLE_VALUE) { port->status = PORT_CLOSED; - rb_raise(rb_eRuntimeError, "Unable to open comport: `%s`", port->settings.ComPort); + rb_raise(rb_eIOError, "Unable to open comport: `%s`", port->settings.ComPort); } else { port->status = PORT_OPEN;