#1 Burning Software

It is currently Thu Dec 19, 2024 1:44 pm

All times are UTC




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Error reporting
PostPosted: Sun Nov 16, 2008 5:39 am 
Offline

Joined: Tue Sep 23, 2008 3:52 am
Posts: 58
Why doesn't the grabber (GrabTrackAsAudio) report errors as COM errors? It only reports using LastError. I don't know how the other grabbers error reporting is done, but at least with GrabTrackAsAudio and no space LastError is reporting:
CStarBurn_CdvdBurnerGrabber::GrabTrackCooked(): WriteFile() failed, status 112.
I think that this should also issue a COM error like the the burner errors. I just find it better to work with COM errors, and don't understand why only some functions/methods issue COM errors.
....unless you have a reason for this....or is this a bug?

EDIT: I just noticed LastErrorCode doesn't return anything on GrabTrackAsAudio, so now I assume that this is actually a bug.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 16, 2008 2:51 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
We've designed the component this way. You prefer COM exceptions I do prefer system error codes.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 16, 2008 9:14 pm 
Offline

Joined: Tue Sep 23, 2008 3:52 am
Posts: 58
OK point taken. But,
1/ Can I ask why some are COM and some are system, instead of everything one way so there isn't this initial confusion?
2/ And if system is preferred, why it doesn't return a more descriptive, "logical/layman" reason why it failed like the COM error does? Ex, COM will say exactly what went wrong, where if there is no space on the drive, the grabber will only say "CStarBurn_CdvdBurnerGrabber::GrabTrackCooked(): WriteFile() failed, status 112." instead of just "Drive out of space, write failed". And why doesn't it give an error code?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 16, 2008 11:36 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
//
// MessageId: ERROR_DISK_FULL
//
// MessageText:
//
// There is not enough space on the disk.
//
#define ERROR_DISK_FULL 112L


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 17, 2008 1:02 am 
Offline

Joined: Tue Sep 23, 2008 3:52 am
Posts: 58
I don't know what exactly you are showing me. I assume you are saying that "There is not enough space on the disk. " is what I should be seeing, but I just see what the LastError is returning to me in StarBurnX which is "CStarBurn_CdvdBurnerGrabber::GrabTrackCooked(): WriteFile() failed, status 112.".


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 17, 2008 11:20 am 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
Status code interpreted.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 17, 2008 1:03 pm 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
Hello!

1) All methods of StarBurnX return the status of operation as HRESULT value!!!! So if method has failed then the non S_OK HRESULT will be returned!!

now the returned error code is:

SEVERITY_ERROR + FACILITY_CONTROL + numOfStarBurnX error ( see the STARBURN_RESULT_CODES enumeration!!!!)

The numOfStarBurnX error can be returned also from the LastErrorCode property.

2) The WIN32 error is returned as :

SEVERITY_ERROR + FACILITY_WIN32 + win32errorCode

3) Perhaps not all error codes WIN32 are returned correctly :( so .. we will be grateful to you for the any help to identify these error codes :)

4) We DON'T return the description of WIN32 error :( but we will fix this bug in the next update of the StarBurnX).

5) We plan to extend the list of StarBurn error codes!!


Regards,

Dmitry


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 17, 2008 4:45 pm 
Offline

Joined: Tue Sep 23, 2008 3:52 am
Posts: 58
I'm sorry, I don't understand anything that you said dima. At the end of the day I guess I just need to know which is returning the correct thing; what I'm getting below with the burner functions, or the error I'm getting with GrabTrackAsAudio stated in the previous posts.

Also note, the lasterrorcode with GrabTrackAsAudio is returning 0 for not enough space.

---------------------------------
LastError: No tracks specified
LastErrorCode: 672
---------------------------------
LastError: Current disc is not recordable CD disc
LastErrorCode: 646
---------------------------------
LastError: Drive is not ready
LastErrorCode: 636
---------------------------------
LastError: No free space
LastErrorCode: 629
---------------------------------

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 17, 2008 5:57 pm 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
Hello,

So ...

1) Q: At the end of the day I guess I just need to know which is returning the correct thing;
A: Analyze the HRESULT!!!

2) The LastErrorCode with GrabTrackAsAudio is returning 0 for not enough space
A: This type of error ("not enough space") is not handled by StarBurnX so this is not StarBurnX error and the LastErrorCode = 0. The HRESULT value will contains the real WIN32 error code!!!

3) The LastErrorCode property keeps only the the StarBurnX error codes - See the STARBURN_RESULT_CODES enumeration!

4) When the StarBurnX "throws" the STARBURNX ERROR then:
- the LastErrorCode contains code of this error ( see the STARBURN_RESULT_CODES)
- HRESULT is not S_OK and includes the STARBURNX ERROR code!!


Is it clear? Any Questions?!


Regrads,

Dmitry


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 24, 2008 7:05 pm 
Offline

Joined: Tue Sep 23, 2008 3:52 am
Posts: 58
1/ When I said I didn't understand, it had to do with "HRESULT". What it is and where it is I'm suppose to look for that. I found http://en.wikipedia.org/wiki/HRESULT, but didn't really get it.

2 - 4/ I understand.

But if free space isn't handled by "X" why is STARBURN_ERR_DISC_NO_FREE_SPACE in the available error reports? What is that? That is what I meant and was looking to get when I said "not enough space".


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 25, 2008 6:10 pm 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
Hello,

The return value of COM functions and methods is an HRESULT, which is 32-bit value with several fields encoded in a single 32-bit ULONG variable. If HRESULT value is 0 - Success. If value is not 0 - Failno exceptions!

The managed (or script) languages wrap the HRESULT value in an Exception class or in special Error class. Thus you can detect the number of System Error (as well as number of StarBurnX error :)) through an Exception class (Error object) provided by your development environment. For example:
- The global class Error is used in VisualBasic;
- The COMException class is used in C#;

Regards,

Dmitry


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group