LibreOffice Module shell (master) 1
zipexcptn.cxx
Go to the documentation of this file.
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#include <global.hxx>
21#include "zipexcptn.hxx"
22
23
25 m_Error(Error)
26{
27}
28
29
31{
32}
33
34
36{
37 return m_Error;
38}
39
40
43{
44}
45
46
47const char* ZipException::what() const noexcept
48{
49 return nullptr;
50}
51
52
55 m_MsgBuff(nullptr)
56{
57}
58
59
61{
62 if (m_MsgBuff)
63 LocalFree(m_MsgBuff);
64}
65
66
67const char* Win32Exception::what() const noexcept
68{
69 if (m_MsgBuff == nullptr)
70 {
71 FormatMessageA(
72 FORMAT_MESSAGE_ALLOCATE_BUFFER |
73 FORMAT_MESSAGE_FROM_SYSTEM |
74 FORMAT_MESSAGE_IGNORE_INSERTS,
75 nullptr,
77 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
78 reinterpret_cast<LPSTR>(&m_MsgBuff),
79 0,
80 nullptr);
81 }
82
83 return m_MsgBuff;
84}
85
86
89{
90}
91
92
95{
96}
97
98
101{
102}
103
104/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
AccessViolationException(int Error)
Definition: zipexcptn.cxx:93
IOException(int Error)
Definition: zipexcptn.cxx:99
int GetErrorCode() const
Definition: zipexcptn.cxx:35
RuntimeException(int Error)
Definition: zipexcptn.cxx:24
virtual ~RuntimeException() noexcept override
Definition: zipexcptn.cxx:30
char * m_MsgBuff
Definition: zipexcptn.hxx:56
Win32Exception(int Error)
Definition: zipexcptn.cxx:53
virtual const char * what() const noexcept override
Definition: zipexcptn.cxx:67
virtual ~Win32Exception() noexcept override
Definition: zipexcptn.cxx:60
ZipContentMissException(int Error)
Definition: zipexcptn.cxx:87
virtual const char * what() const noexcept override
Definition: zipexcptn.cxx:47
ZipException(int Error)
Definition: zipexcptn.cxx:41
Error