As I understand the system my text is correct. throw. goes only to catcht., and catch. picks up other errors.
If I'm wrong I hope someone will set me right. Henry Rich > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Björn Helgason > Sent: Thursday, April 12, 2007 10:12 AM > To: Beta forum > Subject: Re: [Jbeta] Asserts must be tacit > > I think that throw. is what I was looking for > > http://www.jsoftware.com/help/jforc/control_structures.htm > > "throw. aborts the explicit definition that is running, and looks in > higher-level explicit definitions for a catcht. block to > execute. If the > previously-running explicit definition was executing in *block1* of a > try. block > that contains a catcht., execution resumes with that catcht. block; > otherwise, that explicit definition is also aborted, and the search > continues in the next-most-recent explicit definition. If > this search does > not find a catcht. block to execute, the entire executing sentence is > aborted, producing no result." > > By the way is the text here correct? > > "try. block that contains a catcht., execution resumes with > that catcht. > block;" > > I would have thought it should be: > > "try. block that contains a catch., execution resumes with that catch. > block;" > > > > 2007/4/10, Oleg Kobchenko <[EMAIL PROTECTED]>: > > > > Sorry, no. XML must be well formed first. > > I believe expat also might do DTD validation. > > > > Then if you use more advanced xml engines that > > supports xml schema, you can provide more > > sophisticated validation. And that's a very good > > thing. It saves your code from doing a lot of > > validation manually. > > > > So to help you in this situation, you either > > specify correct encoding in XML processing instruction > > or do charecter replace in XML text of unwanted > > character before you feed it to the XML parser. > > > > > > --- Björn Helgason <[EMAIL PROTECTED]> wrote: > > > > > Is it possible to let this assert do a catch so the > process do not stop? > > > > > > Like in this case the failure is in a tag I am not interested in > > > It usually contains "|" and somtimes nothing until now it > contains "" > > and > > > breaks the run of the job > > > I would like to change "" to something else like "|" and go on > > > > > > --------------------------------------------------------- > > > assertion failure > > > assert[0] 0 0"_ $ 13!:8^:((0: e. ])`(12"_)) > > > parse__p[3] (assert~ error) 0 end. > > > process_psax3_[2] parse__p y > > > call_dcm_xml[3] process_psax3_ fread y > > > geri[12] call_dcm_xml &. > a > > > script[0] [: 3 : '0!:0 y [ 4!:55<''y''' jpath_z_&.:> > > > fn[0] script > > > load[4] fn fl > > > load[0] 0 load y > > > > > > -------------------------------------------------------------- > > > XML Parsing Error: not well-formed > > > Location: file:///C:/j601/user/CTDI/DICOM/xml/im000024.xml > > > Line Number 11, Column 86:<element tag="0002,0016" vr="AE" vm="1" > > len="18" > > > name="SourceApplicationEntityTitle"></element> > > > > > > --------------------------------------------------------------- > > > > > > 2007/4/9, Oleg Kobchenko <[EMAIL PROTECTED]>: > > > > > > > > Only tacit asserts report the correct location > > > > of error in the user code. Explitic asserts > > > > report error in its own body, which is useless. > > > > > > > > Currently in jsocket, sdcheck is defined as > > > > > > > > sdcheck=: 3 : 'if. 0~:>{.y do. (sderror y) 13!:8 [ 3 > else. }. y > > end.' > > > > > > > > As a result we have, > > > > > > > > c=. 'jssc' conew~ 1200;'localhost';2;1 > > > > |EWOULDBLOCK: sdcheck > > > > | (sderror y) 13!:8[3 > > > > > > > > Now if redifined as tacit (note also becoming more compact and > > J-like), > > > > > > > > sdcheck_jsocket_=: }. ` (sderror 13!:8 3:) @. (0 ~: >@{.) > > > > > > > > we have, > > > > > > > > c=. 'jssc' conew~ 1200;'localhost';2;1 > > > > |EWOULDBLOCK: sdcheck > > > > | sdcheck sdconnect sk;(sdcheck sdgethostbyname > host),<port > > > > > > > > which exactly shows the point in code where error occurred. > > > > > > > > > > > > > > > > > > > ______________________________________________________________ > ______________________ > > Don't get soaked. Take a quick peak at the forecast > > with the Yahoo! Search weather shortcut. > > http://tools.search.yahoo.com/shortcuts/#loc_weather > > > ---------------------------------------------------------------------- > > For information about J forums see > http://www.jsoftware.com/forums.htm > > > > > > -- > Björn Helgason, Verkfræðingur > Fugl&Fiskur ehf, Þerneyjarsund 23, Box 127 > 801 Grímsnes ,t-póst: [EMAIL PROTECTED] > Skype: gosiminn, gsm: +3546985532 > Landslags og skrúðgarðagerð, gröfuþjónusta > http://groups.google.com/group/J-Programming > > > Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari > einfaldleikans > > góður kennari getur stigið á tær án þess að glansinn fari af skónum > /|_ .-----------------------------------. > ,' .\ / | Með léttri lund verður | > ,--' _,' | Dagurinn í dag | > / / | Enn betri en gærdagurinn | > ( -. | `-----------------------------------' > | ) | (\_ _/) > (`-. '--.) (='.'=) > `. )----' (")_(") > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
