LCOV - code coverage report
Current view: top level - framework/source/inc/loadenv - loadenvexception.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 4 0.0 %
Date: 2014-11-03 Functions: 0 2 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_FRAMEWORK_SOURCE_INC_LOADENV_LOADENVEXCEPTION_HXX
      21             : #define INCLUDED_FRAMEWORK_SOURCE_INC_LOADENV_LOADENVEXCEPTION_HXX
      22             : 
      23             : #include <com/sun/star/uno/Any.h>
      24             : #include <com/sun/star/uno/Exception.hpp>
      25             : 
      26             : #include <rtl/string.hxx>
      27             : 
      28             : namespace framework{
      29             : 
      30             : /** @short  specify an exception, which can be used inside the
      31             :             load environment only.
      32             : 
      33             :     @descr  Of course outside code must wrapp it, to transport
      34             :             the occurred information to its caller.
      35             :  */
      36             : class LoadEnvException
      37             : {
      38             :     public:
      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 ...
      42             :          */
      43             :         enum EIDs
      44             :         {
      45             :             /** @short  The specified URL/Stream/etcpp. can not be handled by a LoadEnv instance. */
      46             :             ID_UNSUPPORTED_CONTENT,
      47             : 
      48             :             /** @short  It was not possible to get access to global filter configuration.
      49             :                 @descr  Might som neccsessary services could not be created. */
      50             :             ID_NO_CONFIG_ACCESS,
      51             : 
      52             :             /** @short  Some data obtained from the filter configuration seems to incorrect.
      53             :                 @descr  Might a filter-type relation ship seem to be damaged. */
      54             :             ID_INVALID_FILTER_CONFIG,
      55             : 
      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,
      60             : 
      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,
      67             : 
      68             :             /** @short  indicates a failed search for the right target frame. */
      69             :             ID_NO_TARGET_FOUND,
      70             : 
      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
      74             :                         be replaced. */
      75             :             ID_COULD_NOT_SUSPEND_CONTROLLER,
      76             : 
      77             :             /** @short  TODO */
      78             :             ID_COULD_NOT_REACTIVATE_CONTROLLER,
      79             : 
      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.
      82             :              */
      83             :             ID_STILL_RUNNING,
      84             : 
      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 ...
      87             :              */
      88             :             ID_GENERAL_ERROR
      89             :         };
      90             : 
      91             :         sal_Int32 m_nID;
      92             :         OUString m_sMessage;
      93             :         css::uno::Any m_exOriginal;
      94             : 
      95           0 :         LoadEnvException(
      96             :             sal_Int32 id, OUString const & message = OUString(),
      97             :             css::uno::Any const & original = css::uno::Any()):
      98           0 :             m_nID(id), m_sMessage(message), m_exOriginal(original)
      99           0 :         {}
     100             : 
     101           0 :         ~LoadEnvException() {}
     102             : };
     103             : 
     104             : } // namespace framework
     105             : 
     106             : #endif // INCLUDED_FRAMEWORK_SOURCE_INC_LOADENV_LOADENVEXCEPTION_HXX
     107             : 
     108             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10