How can I capture an error?

Discussion forum for PivotCubeX component. Common usage questions. Bug and problem reports

Moderator: Alex Zencovich

How can I capture an error?

Postby ccascante » Fri Mar 02, 2007 5:17 pm

Hi there,

I'm working in an application that saves the last cube and map structure used by the user.

If I make a change to the structure of the cube, when I load the map I get the next message:

"The loaded map is not compatible with currently loaded cube, Measures are mismatch"

Some other times I get : "Cube structure is not defined"

I know the reason why the error occurs, but I need to capture the error in order to send a message to the user informing that the cube has changed and it's necesary to delete the map and the cube saved before. Also run a procedure that deletes that files.

I was looking for a OnError event on the Active X and I didn't not find it.

Best regards from San Jose, Costa Rica
ccascante
User
 
Posts: 18
Joined: Fri Jul 07, 2006 8:46 pm

Postby AlexZencovich » Fri Mar 02, 2007 5:33 pm

Try to put load procedures in try..except block
Best regards,

Alex Zencovich
-------------------------------------------------------------------------------------------------------------------------------------------
www.pivotcube.com - OLAP solution for Delphi, C++ Builder and ActiveX environment
AlexZencovich
Site Admin
 
Posts: 580
Joined: Sun Jun 18, 2006 10:09 am

Postby ccascante » Fri Mar 02, 2007 7:04 pm

Sorry Alex, but I didn't get it.

Would you mind to extend your reply, maybe with a example code.

Thanks.
ccascante
User
 
Posts: 18
Joined: Fri Jul 07, 2006 8:46 pm

Postby AlexZencovich » Fri Mar 02, 2007 9:13 pm

try something like

try
PivotMap1.LoadFromStream(Stream);
except
ShowMessage('Cube are different! Please do not use old savings with new cube');
end;
Best regards,

Alex Zencovich
-------------------------------------------------------------------------------------------------------------------------------------------
www.pivotcube.com - OLAP solution for Delphi, C++ Builder and ActiveX environment
AlexZencovich
Site Admin
 
Posts: 580
Joined: Sun Jun 18, 2006 10:09 am

Postby ccascante » Mon Mar 05, 2007 5:50 pm

Alex,

I'm working with the ActiveX Control and Visual Basic 6.0. I Think you should include a OnError Event to the control.

Best regards
ccascante
User
 
Posts: 18
Joined: Fri Jul 07, 2006 8:46 pm

Postby AlexZencovich » Mon Mar 05, 2007 6:29 pm

ccascante wrote:I'm working with the ActiveX Control and Visual Basic 6.0


In that case you should write your questions in PivotCubeX forum.

I'm not prophet :)
Best regards,

Alex Zencovich
-------------------------------------------------------------------------------------------------------------------------------------------
www.pivotcube.com - OLAP solution for Delphi, C++ Builder and ActiveX environment
AlexZencovich
Site Admin
 
Posts: 580
Joined: Sun Jun 18, 2006 10:09 am

Postby AlexZencovich » Mon Mar 05, 2007 8:46 pm

BTW, you are right there should be more affordable error catching scheme. I will think how to change current way
Best regards,

Alex Zencovich
-------------------------------------------------------------------------------------------------------------------------------------------
www.pivotcube.com - OLAP solution for Delphi, C++ Builder and ActiveX environment
AlexZencovich
Site Admin
 
Posts: 580
Joined: Sun Jun 18, 2006 10:09 am


Return to PivotCube ActiveX

Who is online

Users browsing this forum: No registered users and 0 guests

cron