Skip to content
Snippets Groups Projects
Commit 58a8fd85 authored by francois.grand's avatar francois.grand
Browse files

#46 ajout de messages d'erreur à ParallelStructure.getStructureVarCalc()

parent 26656c58
No related branches found
No related tags found
No related merge requests found
......@@ -176,8 +176,12 @@ export class ParallelStructure extends Nub {
private getStructureVarCalc(sVarCalc: string): IStructureVarCalc {
let sIndex: string;
let sPrm: string;
if (sVarCalc.indexOf(".") == -1)
throw new Error(`getStructureVarCalc() : erreur d'analyse de ${sVarCalc}, (pas de la forme n.X)`);
[sIndex, sPrm] = sVarCalc.split(".");
const i = parseInt(sIndex, 10);
if (i === NaN)
throw new Error(`getStructureVarCalc() : erreur d'analyse de ${sVarCalc} (${sIndex} n'est pas un nombre)`);
return { index: i, prm: sPrm };
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment