rkone / sharpzebra

A .net library that simplifies printing to Zebra printers in their native EPL2/ZPL languages without needing to know EPL2 or ZPL.
MIT License
91 stars 34 forks source link

Fix missing Port exception & improve "Cannot locate" message #13

Closed EatonZ closed 4 years ago

EatonZ commented 4 years ago

I have changed 2 things with this PR:

  1. I was getting an exception and narrowed it down to a printer entry in my registry missing the Port key. I have added handling for missing keys to avoid this exception.
  2. I have improved the exception that is thrown when the USB printer is not found.
EatonZ commented 4 years ago

Ping @rkone

rkone commented 4 years ago

Thanks for your contribution EatonZ!

EatonZ commented 4 years ago

Happy to help, @rkone! Can you publish an updated NuGet package when you get a chance? Thanks!

rkone commented 4 years ago

Sure, I'll get to it shortly.