<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 14pt; color: #000000"><div><style><!--
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EstiloCorreo17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
{page:WordSection1;}
--></style></div><div>Prueba con </div><div>try</div><div>except</div><div> on E: Exception do</div><div> begin</div><div> <span style="color: #000000; font-family: Calibri, sans-serif; font-size: 14.6667px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;" data-mce-style="color: #000000; font-family: Calibri, sans-serif; font-size: 14.6667px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"><span> </span>Log('Error en activar ProSerNeg1.');</span><div style="clear: both;" data-mce-style="clear: both;"> <span style="color: #000000; font-family: Calibri, sans-serif; font-size: 14.6667px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;" data-mce-style="color: #000000; font-family: Calibri, sans-serif; font-size: 14.6667px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">ShowMessage(E.Message);</span></div></div><div> end;</div><div>end;</div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>De: </b>"Spanish version of Lazarus List" <lazarus-es@lists.lazarus-ide.org><br><b>Para: </b>"Spanish version of Lazarus List" <lazarus-es@lists.lazarus-ide.org><br><b>CC: </b>"hfiandor" <hfiandor@ceniai.inf.cu><br><b>Enviados: </b>Jueves, 22 de Junio 2017 1:30:33<br><b>Asunto: </b>[Lazarus-es] try...except<br></div><div><br></div><div data-marker="__QUOTED_TEXT__"><div class="WordSection1"><p class="MsoNormal"><span lang="ES">Estimados listeros:</span></p><p class="MsoNormal"><span lang="ES"> </span></p><p class="MsoNormal"><span lang="ES">Tengo en un procedure lo siguiente:</span></p><p class="MsoNormal"><span lang="EN-US"> try</span></p><p class="MsoNormal"><span lang="EN-US"> if fdm.tProSerNeg1.Active=true then fdm.tProSerNeg1.Active:=false;</span></p><p class="MsoNormal"><span lang="EN-US"> </span><span lang="ES">fdm.tProSerNeg1.FileName:=camino_BD + '\Clasificadores.db';</span></p><p class="MsoNormal"><span lang="ES"> </span><span lang="EN-US">if fdm.tProSerNeg1.Active=false then fdm.tProSerNeg1.Active:=true;</span></p><p class="MsoNormal"><span lang="EN-US"> </span><span lang="ES">Log('ProSerNeg1 está activa.');</span></p><p class="MsoNormal"><span lang="ES"> except</span></p><p class="MsoNormal"><span lang="ES"> Log('Error en activar ProSerNeg1.');</span></p><p class="MsoNormal"><span lang="ES"> </span><span lang="EN-US">On E :Exception do</span></p><p class="MsoNormal"><span lang="EN-US"> begin ShowMessage(E.Message); end;</span></p><p class="MsoNormal"><span lang="EN-US"> </span><span lang="ES">end;</span></p><p class="MsoNormal"><span lang="ES"> </span></p><p class="MsoNormal"><span lang="ES">Deseo conocer cuál es el error.</span></p><p class="MsoNormal"><span lang="ES"> </span></p><p class="MsoNormal"><span lang="ES">Cuando trato de compilar, me dice que “On not found..” o algo parecido.</span></p><p class="MsoNormal"><span lang="ES"> </span></p><p class="MsoNormal"><span lang="ES">Leí una página web sobre Try…except y no me dice mucho más que esto.</span></p><p class="MsoNormal"><span lang="ES"> </span></p><p class="MsoNormal"><span lang="ES">Evidentemente me falta algo, que no sé qué es. O quizás he redactado mal el error handling.</span></p><p class="MsoNormal"><span lang="ES"> </span></p><p class="MsoNormal"><span lang="ES">Les agradecería alguna ayuda para aprender y salir del apuro.</span></p><p class="MsoNormal"><span lang="ES"> </span></p><p class="MsoNormal"><span lang="ES" style="mso-fareast-language: ES-MX;" data-mce-style="mso-fareast-language: ES-MX;">Saludos</span></p><p class="MsoNormal"><span lang="ES" style="mso-fareast-language: ES-MX;" data-mce-style="mso-fareast-language: ES-MX;">Ing. Héctor F. Fiandor Rosario</span></p><p class="MsoNormal"><span lang="ES"> </span></p></div><br>_______________________________________________<br>Lazarus-es mailing list<br>Lazarus-es@lists.lazarus-ide.org<br>http://lists.lazarus-ide.org/listinfo/lazarus-es<br></div></div></body></html>