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.
____________________________________________________________________________________
8:00? 8:25? 8:40? Find a flick in no time
with the Yahoo! Search movie showtime shortcut.
http://tools.search.yahoo.com/shortcuts/#news
----------------------------------------------------------------------
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