Re: [oXygen-sdk] oXygen-sdk Digest, Vol 51, Issue 2

Hi, That is what we do now. Attached two screenshots: Out-of-the-box Oxygen behavior (dita file not from our repository, but from the file system) -> attached file: non_repository_conrefed_file_not_found.png Behavior for a dita document from our repository, handled through our custom plug-in (which is a FileNotFound) -> attached file: from_repository_conrefed_file_not_found.png If possible we would like to see the same [Target file not found] error and the details when hoovering over the error icon. getCanonicalFileFromFileUrl is indeed in our CustomProtocolHandler. 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. But I think we need to validate somewhere earlier in the process if the conrefed document exists and throw the correct exception there? -Pascal www.sdl.com 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. SDL PLC is a public limited company registered in England and Wales. Registered number: 02675207. Registered address: SDL PLC, New Globe House, Vanwall Business Park, Vanwall Road, Maidenhead, SL6 4UB, U.K. -----Original Message----- From: oXygen-sdk [mailto:oxygen-sdk-bounces@oxygenxml.com] On Behalf Of oxygen-sdk-request@oxygenxml.com Sent: Wednesday, February 7, 2018 7:00 PM To: oxygen-sdk@oxygenxml.com Subject: oXygen-sdk Digest, Vol 51, Issue 2 Send oXygen-sdk mailing list submissions to oxygen-sdk@oxygenxml.com To subscribe or unsubscribe via the World Wide Web, visit https://www.oxygenxml.com/mailman/listinfo/oxygen-sdk or, via email, send a message with subject or body 'help' to oxygen-sdk-request@oxygenxml.com You can reach the person managing the list at oxygen-sdk-owner@oxygenxml.com When replying, please edit your Subject line so it is more specific than "Re: Contents of oXygen-sdk digest..." Today's Topics: 1. Re: Handle 'Target file not found' in our custom plugin/dita framework (Radu Coravu) ---------------------------------------------------------------------- Message: 1 Date: Tue, 6 Feb 2018 20:00:22 +0200 From: Radu Coravu <support@oxygenxml.com> To: oxygen-sdk@oxygenxml.com Subject: Re: [oXygen-sdk] Handle 'Target file not found' in our custom plugin/dita framework Message-ID: <354e568b-bb2c-96cc-ae07-cb383a186c6c@oxygenxml.com> Content-Type: text/plain; charset="utf-8"; Format="flowed" Hi Pascal, Maybe when your URLConnection.getInputStream() is called for an URL to a non existing resource you could throw a " FileNotFoundException" which extends IOException. About your remark:
For the moment we return a new File(tothenonexistingpath) in getCanonicalFileFromFileUrl where in the code is that? In your custom url connection handler? Can you give me more details?
Regards, Radu On 2/6/18 5:01 PM, Pascal Beutels wrote:
Hi,
When handling conrefs to objects that no longer exist in our CMS, we would like to handle this the same way as regular dita files with the same issue.
E.g
<noteid="GUID-364D534C-E105-4CA7-81B5-FA910387D630"conref="./Jenkins/n onexistingfile.dita">
Results in a ‘[Target file not found]’ error with more details when you hover over.
For the moment we return a new File(tothenonexistingpath) in getCanonicalFileFromFileUrl, which results in the erro:
xxx\GUID-C2F39B76-FDC6-4E7C-80E1-36E7BC635FBA (The system cannot find the file specified)
Is there a way we can raise the same error from our custom code?
Kind regards,
Pascal
*www.sdl.com* <http://www.sdl.com/>
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. SDL PLC is a public limited company registered in England and Wales. Registered number: 02675207. Registered address: SDL PLC, New Globe House, Vanwall Business Park, Vanwall Road, Maidenhead, SL6 4UB, U.K.
_______________________________________________ oXygen-sdk mailing list oXygen-sdk@oxygenxml.com https://www.oxygenxml.com/mailman/listinfo/oxygen-sdk
-- Radu Coravu Oxygen XML Editor
participants (1)
-
Pascal Beutels