Home › Forums › TWAIN Classic › Twain Error Detection/Suppresion
- This topic has 7 replies, 3 voices, and was last updated 13 years, 7 months ago by twainuser123.
- AuthorPosts
I have a fujitsu fi-5015 scanner and i am scanning from my C# application.When the scanning is in progress and the user pulls the scanning page out the twain driver comesup with the error saying that there is “No paper on ADF paper chute or Hopper” and when i click cancel the application crashes.is there a way to suppress error messages or is there a way to catch the error from my C# app???
Thanks,
VJthere aren’t (as far as I know) any seetings in twain to suppress error messages, and even if there were what makes you think vendors would follow that part of the spec when they don’t follow it in so many other areas?
for error suppression I rolled a couple of .net classes to deal with dialog managment, I’ve you’re looking for a link to the code lemme know.Since this is happening in your app, I’d have to say yes there is a way to catch the error from your app, where in your would depend on where the errors happens. If you post a snip of the code where your code goes kaboom, it would help.
TwainSession m_cTwainSession;
m_cTwainSession.AcquirePage += new EventHandler(_twain_AcquirePage);
Error happens in the line below
m_cTwainSession.Acquire(TwainUserInterfaceFlags.None);ha, ok I wasn’t quite specific enough.
does wrapping .Acquire in a try catch help? – is an exception thrown?
what library/wrapper are you using? does your app throw the exception or is the library/wrapper throwing it?Try catch block does not help because i think the Twain Driver is throwing the error.So the error shows up and then the application goes to the next line.I dont think there is any way to catch the error in the App.I was wondering if there is something i could do to atleast not have the “cancel” button showup in the message box coz when i click it this is when i get an error.
VJand this might not help much but that looks like a standard error from your scanner http://www.fujitsu.com/downloads/AU/drvguide_91147.pdf
and I’d guess you’re using the leadtools library. if that’s right you might benifit from asking this over on the leadtool site:
http://support.leadtools.com/SupportPortal/DesktopDefault.aspxtry to reproduce the crash in another app, off the top of my head I’d say try mine code over at codeplex/opentwain so you can step thru it in the debugger.
A possible solution was found here: http://www.twainforum.org/viewtopic.php?t=4200
- AuthorPosts