1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_FRAMEWORK_SOURCE_INC_LOADENV_LOADENVEXCEPTION_HXX
21 #define INCLUDED_FRAMEWORK_SOURCE_INC_LOADENV_LOADENVEXCEPTION_HXX
23 #include <com/sun/star/uno/Any.h>
24 #include <com/sun/star/uno/Exception.hpp>
26 #include <rtl/string.hxx>
30 /** @short specify an exception, which can be used inside the
31 load environment only.
33 @descr Of course outside code must wrapp it, to transport
34 the occurred information to its caller.
36 class LoadEnvException
39 /** @short Can be used as an ID for an instance of a LoadEnvException.
40 @descr To prevent errors on adding/removing/changing such IDs here,
41 an enum field is used. Its int values are self organized ...
45 /** @short The specified URL/Stream/etcpp. can not be handled by a LoadEnv instance. */
46 ID_UNSUPPORTED_CONTENT
,
48 /** @short It was not possible to get access to global filter configuration.
49 @descr Might som neccsessary services could not be created. */
52 /** @short Some data obtained from the filter configuration seems to incorrect.
53 @descr Might a filter-type relationship seem to be damaged. */
54 ID_INVALID_FILTER_CONFIG
,
56 /** @short indicates a corrupted media descriptor.
57 @descr Some parts are required - some other ones are optional. Such exception
58 should be thrown, if a required item does not exists. */
59 ID_INVALID_MEDIADESCRIPTOR
,
61 /** @short Its similar to an uno::RuntimeException ....
62 @descr But such runtime exception can break the whole office code.
63 So its capsulated to this specialized load environment only.
64 Mostly it indicates a missing but needed resource ... e.g the
65 global desktop reference! */
66 ID_INVALID_ENVIRONMENT
,
68 /** @short indicates a failed search for the right target frame. */
71 /** @short An already existing document was found inside a target frame.
72 But its controller could not be suspended successfully. Thats
73 why the new load request was cancelled. The document could not
75 ID_COULD_NOT_SUSPEND_CONTROLLER
,
78 ID_COULD_NOT_REACTIVATE_CONTROLLER
,
80 /** @short indicates an already running load operation. Of course the same
81 instance can't be used for multiple load requests at the same time.
85 /** @short sometiems we can't specify the reason for an error, because we
86 was interrupted by an called code in an unexpected way ...
93 css::uno::Any m_exOriginal
;
96 sal_Int32 id
, OUString
const & message
= OUString(),
97 css::uno::Any
const & original
= css::uno::Any()):
98 m_nID(id
), m_sMessage(message
), m_exOriginal(original
)
101 ~LoadEnvException() {}
104 } // namespace framework
106 #endif // INCLUDED_FRAMEWORK_SOURCE_INC_LOADENV_LOADENVEXCEPTION_HXX
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */