Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, June 19, 2007 3:59:45 AM(UTC)

subbu  
subbu

Groups: Registered
Posts: 13


Hi,

Subject: How to Catch Twain Exceptions and Display my own User Defined Error Messages

I am working with LeadTools 15.0 SDK. For Example i want to catch PaperJam Exception and diplay ny own message like:

try

{

   _twainsession.Acquire(TwainUserInterfaceFlags.None);

}

catch(TwainException ex)

{

     If (ex.code= =TwainExceptionCode.PaperJam) Message.show("Paper Jam");

}

But the _twainsession.Acquire method displays its own message as shown in the attachment. The control doesm't pass to the next code line till I click Cancel. After Clicking the canecl button it displayes one more Error Message "DS or DSM reported error, app shouldn't (no need for your app to report error). Why is this so, please help me in resolving this issue.

Regards

Sridhar

   

      

      

      

subbu attached the following image(s):
ErrorMessage.JPG
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, June 19, 2007 11:21:23 PM(UTC)

subbu  
subbu

Groups: Registered
Posts: 13


Hi,

Subject: How to Catch Twain Exceptions and Display my own User Defined Error Messages

I am working with LeadTools 15.0 SDK. For Example i want to catch PaperJam Exception and diplay ny own message like:

try

{

   _twainsession.Acquire(TwainUserInterfaceFlags.None);

}

catch(TwainException ex)

{

     If (ex.code= =TwainExceptionCode.PaperJam) Message.show("Paper Jam");

}

But the _twainsession.Acquire method displays its own message as shown in the attachment. The control doesm't pass to the next code line till I click Cancel. After Clicking the canecl button it displayes one more Error Message "DS or DSM reported error, app shouldn't (no need for your app to report error). Why is this so, please help me in resolving this issue.

Regards

Sridhar

subbu attached the following image(s):
ErrorMessage.JPG
 
#3 Posted : Wednesday, June 20, 2007 5:22:15 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


Unfortunately, you cannot catch this error because it is being reported and displayed by the TWAIN driver.  TWAIN works like a black box.  With LEADTOOLS you can get and set capabilities and properties before you scan, but once you call Acquire to scan, all control is given to the scanner and unfortunately this is one thing you can't control.
 
#4 Posted : Wednesday, June 20, 2007 5:49:57 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Sridhar,





In addition to what my colleague Greg said, this message box is popped
by the Twain driver itself, not by LEADTOOLS. I have seen a similar error message in user's guide of a Fujitsu scanner.
There is no function in the Twain standard to turn off error messages related to the device if they are produced by the Twain driver itself.
Try to contact the vendors of your scanner to see if they have a way of suppressing error messages.

 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.064 seconds.