<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body><div>Hi,<br /><br />That is what we do now.<br /><br />Attached two screenshots:<br />Out-of-the-box Oxygen behavior (dita file not from our repository, but from the file system) <br /> -> attached file: non_repository_conrefed_file_not_found.png<br />Behavior for a dita document from our repository, handled through our custom plug-in (which is a FileNotFound) <br /> -> attached file: from_repository_conrefed_file_not_found.png <br /><br /><br />If possible we would like to see the same [Target file not found] error and the details when hoovering over the error icon.<br /><br />getCanonicalFileFromFileUrl is indeed in our CustomProtocolHandler.<br /><br />I think we get the file not found error because it is raised at the time Oxygen wants to open the file to get the conrefed content.<br />But I think we need to validate somewhere earlier in the process if the conrefed document exists and throw the correct exception there? <br /><br /><br />-Pascal<br /><br /><div style="mso-line-height-rule:exactly;-webkit-text-size-adjust:100%;white-space:nowrap;"><table cellpadding="0" cellspacing="0" border="0" style="width:100%;font-size:0;"><tr><td align="left" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="font-size:0;"><tr><td align="left" style="padding:0 0 15px;vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="font-size:0;line-height:normal;"><tr><td align="left" style="vertical-align:top;"><img src="https://www.sdl.com/static/corporate/SDL25y_emailLogo.png" border="0" alt="" style="font-size:0;" /></td></tr><tr><td align="left" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="color:#000001;font-size:14.67px;font-family:Arial;font-weight:400;font-style:normal;text-align:justify;"><tr><td style="font-family:Calibri;"><a href="http://www.sdl.com/" target="_blank" id="LPlnk689713" style="text-decoration:none;color:#000001;"><strong style="font-weight:400;">www.sdl.com</strong></a></td></tr></table></td></tr></table></td></tr><tr style="white-space:normal;"><td align="left" style="padding:0;vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="color:#A1A1A1;font-size:10.67px;font-family:Arial;font-weight:400;font-style:normal;text-align:justify;width:100%;"><tr><td style="font-family:Calibri;">SDL PLC confidential, all rights reserved. If you are not the intended recipient of this mail SDL requests and requires that you delete it without acting upon or copying any of its contents, and we further request that you advise us.<br />SDL PLC is a public limited company registered in England and Wales. Registered number: 02675207. <br />Registered address: <span style="background-color:transparent;">SDL PLC, </span>New Globe House, Vanwall Business Park, Vanwall Road, Maidenhead, SL6 4UB, U.K.<br /></td></tr></table></td></tr></table></td></tr></table></div><span style="font-family:remialcxesans;"> </span>-----Original Message-----<br />From: oXygen-sdk [mailto:oxygen-sdk-bounces@oxygenxml.com] On Behalf Of oxygen-sdk-request@oxygenxml.com<br />Sent: Wednesday, February 7, 2018 7:00 PM<br />To: oxygen-sdk@oxygenxml.com<br />Subject: oXygen-sdk Digest, Vol 51, Issue 2<br /><br />Send oXygen-sdk mailing list submissions to<br /> oxygen-sdk@oxygenxml.com<br /><br />To subscribe or unsubscribe via the World Wide Web, visit<br /> https://www.oxygenxml.com/mailman/listinfo/oxygen-sdk<br />or, via email, send a message with subject or body 'help' to<br /> oxygen-sdk-request@oxygenxml.com<br /><br />You can reach the person managing the list at<br /> oxygen-sdk-owner@oxygenxml.com<br /><br />When replying, please edit your Subject line so it is more specific than "Re: Contents of oXygen-sdk digest..."<br /><br /><br />Today's Topics:<br /><br /> 1. Re: Handle 'Target file not found' in our custom plugin/dita<br /> framework (Radu Coravu)<br /><br /><br />----------------------------------------------------------------------<br /><br />Message: 1<br />Date: Tue, 6 Feb 2018 20:00:22 +0200<br />From: Radu Coravu <support@oxygenxml.com><br />To: oxygen-sdk@oxygenxml.com<br />Subject: Re: [oXygen-sdk] Handle 'Target file not found' in our custom<br /> plugin/dita framework<br />Message-ID: <354e568b-bb2c-96cc-ae07-cb383a186c6c@oxygenxml.com><br />Content-Type: text/plain; charset="utf-8"; Format="flowed"<br /><br />Hi Pascal,<br /><br />Maybe when your URLConnection.getInputStream() is called for an URL to a non existing resource you could throw a " FileNotFoundException" which extends IOException.<br /><br />About your remark:<br /><br />> For the moment we return a new File(tothenonexistingpath) in <br />> getCanonicalFileFromFileUrl<br />where in the code is that? In your custom url connection handler? Can you give me more details?<br /><br />Regards,<br /><br />Radu<br /><br /><br />On 2/6/18 5:01 PM, Pascal Beutels wrote:<br />><br />> Hi,<br />><br />> When handling conrefs to objects that no longer exist in our CMS, we <br />> would like to handle this the same way as regular dita files with the <br />> same issue.<br />><br />> E.g<br />><br />> <noteid="GUID-364D534C-E105-4CA7-81B5-FA910387D630"conref="./Jenkins/n<br />> onexistingfile.dita"><br />><br />> Results in a ‘[Target file not found]’ error with more details when <br />> you hover over.<br />><br />> For the moment we return a new File(tothenonexistingpath) in <br />> getCanonicalFileFromFileUrl, which results in the erro:<br />><br />> xxx\GUID-C2F39B76-FDC6-4E7C-80E1-36E7BC635FBA (The system cannot find <br />> the file specified)<br />><br />> Is there a way we can raise the same error from our custom code?<br />><br />> Kind regards,<br />><br />> Pascal<br />><br />> *www.sdl.com* <http://www.sdl.com/><br />><br />> SDL PLC confidential, all rights reserved. If you are not the intended <br />> recipient of this mail SDL requests and requires that you delete it <br />> without acting upon or copying any of its contents, and we further <br />> request that you advise us.<br />> SDL PLC is a public limited company registered in England and Wales. <br />> Registered number: 02675207.<br />> Registered address: SDL PLC, New Globe House, Vanwall Business Park, <br />> Vanwall Road, Maidenhead, SL6 4UB, U.K.<br />><br />><br />><br />> _______________________________________________<br />> oXygen-sdk mailing list<br />> oXygen-sdk@oxygenxml.com<br />> https://www.oxygenxml.com/mailman/listinfo/oxygen-sdk<br /><br />--<br />Radu Coravu<br />Oxygen XML Editor<br /><br />-------------- next part --------------<br />An HTML attachment was scrubbed...<br />URL: <http://www.oxygenxml.com/pipermail/oxygen-sdk/attachments/20180206/6ceadfe6/attachment-0001.html><br /><br />------------------------------<br /><br />Subject: Digest Footer<br /><br />_______________________________________________<br />oXygen-sdk mailing list<br />oXygen-sdk@oxygenxml.com<br />https://www.oxygenxml.com/mailman/listinfo/oxygen-sdk<br /><br /><br />------------------------------<br /><br />End of oXygen-sdk Digest, Vol 51, Issue 2<br />*****************************************<br /></div></body></html>