Project

General

Profile

Anomalie #34

Probleme Ouvert: CVariant et throw

Added by Serge Koudoro over 15 years ago. Updated over 15 years ago.

Status:
Nouveau
Priority:
Bas
Assignee:
-
Category:
old plone Bugs
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Description:
----------------------------------------
Difficulté: **
Module: tous
Dans certains cas, les méthodes de CVariant peuvent déclencher des exceptions.
Pour faciliter la gestion des erreurs, il serait bon d'intercepter ces
exceptions et de renvoyer un RES_ERROR.
Exemple:
RES_C maFonction( CVariant& varOut ) {
int n = 0;
varOut = n; // ceci peut déclencher une exception
return RES_OK;
}
deviendrait:
RES_C maFonction( CVariant& varOut ) {
int n = 0;
try {
varOut = n;
}
catch(MException e) {
MORPHEE_REGISTER_ERROR(std::string(e.what()));
return RES_ERROR;
}
return RES_OK;
}
Les configurations à surveiller sont principalement les copies et
constructions par copies:
int n = ... ;
CVariant cv = n;
int n = ...;
Cvariant cv;
cv = n;
et vice-versa:
CVariant cv = ... ;
int n = cv;
CVariant cv = ... ;
int n;
n = cv;

#2 12/11/2007 10:16 (Tibs)
---------------------------------------------------------------------------
Change: status: "pending" -> "defered"
Comment:
Bon on va dire que les pb ouvert du style, seront casé dans "Defered".

#1 16/05/2005 13:34 (romain)
---------------------------------------------------------------------------
Change: classification: "probleme_ouvert" -> "ProblemeOuvert"

#1

Updated by Serge Koudoro over 15 years ago

  • Category set to old plone Bugs
  • Priority changed from Normal to Bas

Also available in: Atom PDF