开源 企业版 高校版 私有云 模力方舟 AI 队友
代码拉取完成,页面将自动刷新
捐赠
捐赠前请先登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
1 Star 0 Fork 1

cpp_workspace/poco

forked from sulayman_tien/poco
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
已有帐号? 立即登录
文件
master
分支 (119)
标签 (59)
master
devel
poco-1.12.5
3990-reactor-performance
poll-closed-server-test
upgrade-ci-actions-to-v3
poco-1.9.5-not-released
3925-c-mysql-compile-fail
poco-1.11.6
poco-1.12.4
poco-1.11.5
poco-1.11.4
poco-1.12.3
feat/acceptor-service-handler-args
poco-1.12.2
fix/posix-sleep
poco-1.12.1
poco-1.12.0
issue-templates
revert-3646-avoid_clang_warning
poco-1.11.6-release
poco-1.12.4-release
poco-1.11.5-release
poco-1.11.4-release
poco-1.12.3-release
poco-1.12.2-release
poco-1.12.1-release
poco-1.12.0-release
poco-1.11.3-release
poco-1.11.2-release
poco-1.11.1-release
poco-1.11.1
poco-1.11.0-release
poco-1.10.1-release
poco-1.10.0-release
poco-1.9.4-release
poco-1.9.3-release
poco-1.9.2-release
poco-1.9.1-release
poco-1.9.0-release
master
分支 (119)
标签 (59)
master
devel
poco-1.12.5
3990-reactor-performance
poll-closed-server-test
upgrade-ci-actions-to-v3
poco-1.9.5-not-released
3925-c-mysql-compile-fail
poco-1.11.6
poco-1.12.4
poco-1.11.5
poco-1.11.4
poco-1.12.3
feat/acceptor-service-handler-args
poco-1.12.2
fix/posix-sleep
poco-1.12.1
poco-1.12.0
issue-templates
revert-3646-avoid_clang_warning
poco-1.11.6-release
poco-1.12.4-release
poco-1.11.5-release
poco-1.11.4-release
poco-1.12.3-release
poco-1.12.2-release
poco-1.12.1-release
poco-1.12.0-release
poco-1.11.3-release
poco-1.11.2-release
poco-1.11.1-release
poco-1.11.1
poco-1.11.0-release
poco-1.10.1-release
poco-1.10.0-release
poco-1.9.4-release
poco-1.9.3-release
poco-1.9.2-release
poco-1.9.1-release
poco-1.9.0-release
克隆/下载
克隆/下载
提示
下载代码请复制以下命令到终端执行
为确保你提交的代码身份被 Gitee 正确识别,请执行以下命令完成配置
初次使用 SSH 协议进行代码克隆、推送等操作时,需按下述提示完成 SSH 配置
1 生成 RSA 密钥
2 获取 RSA 公钥内容,并配置到 SSH公钥
在 Gitee 上使用 SVN,请访问 使用指南
使用 HTTPS 协议时,命令行会出现如下账号密码验证步骤。基于安全考虑,Gitee 建议 配置并使用私人令牌 替代登录密码进行克隆、推送等操作
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # 私人令牌
master
分支 (119)
标签 (59)
master
devel
poco-1.12.5
3990-reactor-performance
poll-closed-server-test
upgrade-ci-actions-to-v3
poco-1.9.5-not-released
3925-c-mysql-compile-fail
poco-1.11.6
poco-1.12.4
poco-1.11.5
poco-1.11.4
poco-1.12.3
feat/acceptor-service-handler-args
poco-1.12.2
fix/posix-sleep
poco-1.12.1
poco-1.12.0
issue-templates
revert-3646-avoid_clang_warning
poco-1.11.6-release
poco-1.12.4-release
poco-1.11.5-release
poco-1.11.4-release
poco-1.12.3-release
poco-1.12.2-release
poco-1.12.1-release
poco-1.12.0-release
poco-1.11.3-release
poco-1.11.2-release
poco-1.11.1-release
poco-1.11.1
poco-1.11.0-release
poco-1.10.1-release
poco-1.10.0-release
poco-1.9.4-release
poco-1.9.3-release
poco-1.9.2-release
poco-1.9.1-release
poco-1.9.0-release
poco
/
PDF
/
src
/
PDFException.cpp
poco
/
PDF
/
src
/
PDFException.cpp
PDFException.cpp 12.08 KB
一键复制 编辑 原始数据 按行查看 历史
Aleksandar Fabijanic 提交于 2022年07月09日 00:28 +08:00 . Release 1.12.0 (#3674)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271
//
// PDFException.cpp
//
// Library: PDF
// Package: PDFCore
// Module: PDFException
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/PDF/PDFException.h"
#include "Poco/Format.h"
#include <string>
#include <typeinfo>
namespace Poco {
namespace PDF {
void HPDF_Error_Handler(HPDF_STATUS error_no, HPDF_STATUS detail_no, void* user_data)
{
switch (error_no)
{
case HPDF_ARRAY_COUNT_ERR:
throw InvalidArgumentException("Internal error. The consistency of the data was lost.");
case HPDF_ARRAY_ITEM_NOT_FOUND:
throw NotFoundException("Internal error. The consistency of the data was lost.");
case HPDF_ARRAY_ITEM_UNEXPECTED_TYPE:
throw InvalidArgumentException("Internal error. The consistency of the data was lost.");
case HPDF_BINARY_LENGTH_ERR:
throw InvalidArgumentException("The length of the data exceeds HPDF_LIMIT_MAX_STRING_LEN.");
case HPDF_CANNOT_GET_PALLET:
throw NotFoundException("Cannot get a pallet data from PNG image.");
case HPDF_DICT_COUNT_ERR:
throw InvalidArgumentException("The count of elements of a dictionary exceeds HPDF_LIMIT_MAX_DICT_ELEMENT");
case HPDF_DICT_ITEM_NOT_FOUND:
throw NotFoundException("Internal error. The consistency of the data was lost.");
case HPDF_DICT_ITEM_UNEXPECTED_TYPE:
throw InvalidArgumentException("Internal error. The consistency of the data was lost.");
case HPDF_DICT_STREAM_LENGTH_NOT_FOUND:
throw NotFoundException("Internal error. The consistency of the data was lost.");
case HPDF_DOC_ENCRYPTDICT_NOT_FOUND:
throw NotFoundException("HPDF_SetPermission() OR HPDF_SetEncryptMode() was called before a password is set.");
case HPDF_DOC_INVALID_OBJECT:
throw IllegalStateException("Internal error. The consistency of the data was lost.");
case HPDF_DUPLICATE_REGISTRATION:
throw IllegalStateException("Tried to register a font that has been registered.");
case HPDF_EXCEED_JWW_CODE_NUM_LIMIT:
throw IllegalStateException("Cannot register a character to the japanese word wrap characters list.");
case HPDF_ENCRYPT_INVALID_PASSWORD:
throw IllegalStateException("Tried to set the owner password to NULL.");
case HPDF_ERR_UNKNOWN_CLASS:
throw InvalidArgumentException("Internal error. The consistency of the data was lost.");
case HPDF_EXCEED_GSTATE_LIMIT:
throw IllegalStateException("The depth of the stack exceeded HPDF_LIMIT_MAX_GSTATE.");
case HPDF_FAILD_TO_ALLOC_MEM:
throw IllegalStateException("Memory allocation failed.");
case HPDF_FILE_IO_ERROR:
throw IOException("File processing failed. (A detailed code is set.)");
case HPDF_FILE_OPEN_ERROR:
throw IOException("Cannot open a file. (A detailed code is set.)");
case HPDF_FONT_EXISTS:
throw IllegalStateException("Tried to load a font that has been registered.");
case HPDF_FONT_INVALID_WIDTHS_TABLE:
throw IllegalStateException("The format of a font-file is invalid. Internal error. The consistency of the data was lost.");
case HPDF_INVALID_AFM_HEADER:
throw IllegalStateException("Cannot recognize a header of an afm file.");
case HPDF_INVALID_ANNOTATION:
throw IllegalStateException("The specified annotation handle is invalid.");
case HPDF_INVALID_BIT_PER_COMPONENT:
throw IllegalStateException("Bit-per-component of a image which was set as mask-image is invalid.");
case HPDF_INVALID_CHAR_MATRICS_DATA:
throw IllegalStateException("Cannot recognize char-matrics-data of an afm file.");
case HPDF_INVALID_COLOR_SPACE:
switch (detail_no)
{
case 1:
throw InvalidArgumentException("The color_space parameter of HPDF_LoadRawImage is invalid.");
case 2:
throw InvalidArgumentException("Color-space of a image which was set as mask-image is invalid.");
case 3:
throw InvalidArgumentException("The function which is invalid in the present color-space was invoked.");
default:
throw PDFException();
}
case HPDF_INVALID_COMPRESSION_MODE:
throw InvalidArgumentException("Invalid value was set when invoking HPDF_SetCommpressionMode().");
case HPDF_INVALID_DATE_TIME:
throw InvalidArgumentException("An invalid date-time value was set.");
case HPDF_INVALID_DESTINATION:
throw InvalidArgumentException("An invalid destination handle was set.");
case HPDF_INVALID_DOCUMENT:
throw InvalidArgumentException("An invalid document handle is set.");
case HPDF_INVALID_DOCUMENT_STATE:
throw IllegalStateException("The function which is invalid in the present state was invoked.");
case HPDF_INVALID_ENCODER:
throw InvalidArgumentException("An invalid encoder handle is set.");
case HPDF_INVALID_ENCODER_TYPE:
throw InvalidArgumentException("A combination between font and encoder is wrong.");
case HPDF_INVALID_ENCODING_NAME:
throw InvalidArgumentException("An Invalid encoding name is specified.");
case HPDF_INVALID_ENCRYPT_KEY_LEN:
throw InvalidArgumentException("The lengh of the key of encryption is invalid.");
case HPDF_INVALID_FONTDEF_DATA:
switch (detail_no)
{
case 1:
throw InvalidArgumentException("An invalid font handle was set.");
case 2:
throw InvalidArgumentException("Unsupported font format.");
default:
throw PDFException();
}
case HPDF_INVALID_FONTDEF_TYPE:
throw IllegalStateException("Internal error. The consistency of the data was lost.");
case HPDF_INVALID_FONT_NAME:
throw NotFoundException("A font which has the specified name is not found.");
case HPDF_INVALID_IMAGE:
throw InvalidArgumentException("Unsupported image format.");
case HPDF_INVALID_JPEG_DATA:
throw InvalidArgumentException("Unsupported image format.");
case HPDF_INVALID_N_DATA:
throw IOException("Cannot read a postscript-name from an afm file.");
case HPDF_INVALID_OBJECT:
switch (detail_no)
{
case 1:
throw IllegalStateException("An invalid object is set.");
case 2:
throw IllegalStateException("Internal error. The consistency of the data was lost.");
default:
throw PDFException();
}
case HPDF_INVALID_OBJ_ID:
throw InvalidArgumentException("Internal error. The consistency of the data was lost.");
case HPDF_INVALID_OPERATION:
switch (detail_no)
{
case 1:
throw IllegalStateException("Invoked HPDF_Image_SetColorMask() against the image-object which was set a mask-image.");
default:
throw PDFException();
}
case HPDF_INVALID_OUTLINE:
throw InvalidArgumentException("An invalid outline-handle was specified.");
case HPDF_INVALID_PAGE:
throw InvalidArgumentException("An invalid page-handle was specified.");
case HPDF_INVALID_PAGES:
throw InvalidArgumentException("An invalid pages-handle was specified. (internel error)");
case HPDF_INVALID_PARAMETER:
throw InvalidArgumentException("An invalid value is set.");
case HPDF_INVALID_PNG_IMAGE:
throw InvalidArgumentException("Invalid PNG image format.");
case HPDF_INVALID_STREAM:
throw InvalidArgumentException("Internal error. The consistency of the data was lost.");
case HPDF_MISSING_FILE_NAME_ENTRY:
throw InvalidArgumentException("Internal error. The \"_FILE_NAME\" entry for delayed loading is missing.");
case HPDF_INVALID_TTC_FILE:
throw InvalidArgumentException("Invalid .TTC file format.");
case HPDF_INVALID_TTC_INDEX:
throw InvalidArgumentException("The index parameter was exceed the number of included fonts");
case HPDF_INVALID_WX_DATA:
throw IOException("Cannot read a width-data from an afm file.");
case HPDF_ITEM_NOT_FOUND:
throw NotFoundException("Internal error. The consistency of the data was lost.");
case HPDF_LIBPNG_ERROR:
throw IOException("An error has returned from PNGLIB while loading an image.");
case HPDF_NAME_INVALID_VALUE:
throw InvalidArgumentException("Internal error. The consistency of the data was lost.");
case HPDF_NAME_OUT_OF_RANGE:
throw InvalidArgumentException("Internal error. The consistency of the data was lost.");
case HPDF_PAGES_MISSING_KIDS_ENTRY:
throw IllegalStateException("Internal error. The consistency of the data was lost.");
case HPDF_PAGE_CANNOT_FIND_OBJECT:
throw NotFoundException("Internal error. The consistency of the data was lost.");
case HPDF_PAGE_CANNOT_GET_ROOT_PAGES:
throw InvalidArgumentException("Internal error. The consistency of the data was lost.");
case HPDF_PAGE_CANNOT_RESTORE_GSTATE:
throw IllegalStateException("There are no graphics-states to be restored.");
case HPDF_PAGE_CANNOT_SET_PARENT:
throw IllegalStateException("Internal error. The consistency of the data was lost.");
case HPDF_PAGE_FONT_NOT_FOUND:
throw NotFoundException("The current font is not set.");
case HPDF_PAGE_INVALID_FONT:
throw InvalidArgumentException("An invalid font-handle was spacified.");
case HPDF_PAGE_INVALID_FONT_SIZE:
throw InvalidArgumentException("An invalid font-size was set.");
case HPDF_PAGE_INVALID_GMODE:
throw InvalidArgumentException("See Graphics mode.");
case HPDF_PAGE_INVALID_INDEX:
throw InvalidArgumentException("Internal error. The consistency of the data was lost.");
case HPDF_PAGE_INVALID_ROTATE_VALUE:
throw InvalidArgumentException("The specified value is not a multiple of 90.");
case HPDF_PAGE_INVALID_SIZE:
throw InvalidArgumentException("An invalid page-size was set.");
case HPDF_PAGE_INVALID_XOBJECT:
throw InvalidArgumentException("An invalid image-handle was set.");
case HPDF_PAGE_OUT_OF_RANGE:
throw RangeException("The specified value is out of range.");
case HPDF_REAL_OUT_OF_RANGE:
throw RangeException("The specified value is out of range.");
case HPDF_STREAM_EOF:
throw IllegalStateException("Unexpected EOF marker was detected.");
case HPDF_STREAM_READLN_CONTINUE:
throw IllegalStateException("Internal error. The consistency of the data was lost.");
case HPDF_STRING_OUT_OF_RANGE:
throw RangeException("The length of the specified text is too long.");
case HPDF_THIS_FUNC_WAS_SKIPPED:
throw IllegalStateException("The execution of a function was skipped because of other errors.");
case HPDF_TTF_CANNOT_EMBEDDING_FONT:
throw IllegalStateException("This font cannot be embedded. (restricted by license)");
case HPDF_TTF_INVALID_CMAP:
throw InvalidArgumentException("Unsupported ttf format. (cannot find unicode cmap.)");
case HPDF_TTF_INVALID_FOMAT:
throw InvalidArgumentException("Unsupported ttf format.");
case HPDF_TTF_MISSING_TABLE:
throw InvalidArgumentException("Unsupported ttf format. (cannot find a necessary table)");
case HPDF_UNSUPPORTED_FONT_TYPE:
throw InvalidArgumentException("Internal error. The consistency of the data was lost.");
case HPDF_UNSUPPORTED_FUNC:
switch (detail_no)
{
case 1:
throw IllegalStateException("The library is not configured to use PNGLIB.");
case 2:
throw IllegalStateException("Internal error. The consistency of the data was lost.");
default:
throw PDFException();
}
case HPDF_UNSUPPORTED_JPEG_FORMAT:
throw InvalidArgumentException("Unsupported JPEG format.");
case HPDF_UNSUPPORTED_TYPE1_FONT:
throw IllegalStateException("Failed to parse .PFB file.");
case HPDF_XREF_COUNT_ERR:
throw IllegalStateException("Internal error. The consistency of the data was lost.");
case HPDF_ZLIB_ERROR:
throw IllegalStateException("An error has occurred while executing a function of Zlib.");
case HPDF_INVALID_PAGE_INDEX:
throw IllegalStateException("An error returned from Zlib.");
case HPDF_INVALID_URI:
throw InvalidArgumentException("An invalid URI was set.");
case HPDF_PAGE_LAYOUT_OUT_OF_RANGE:
throw RangeException("An invalid page-layout was set.");
case HPDF_PAGE_MODE_OUT_OF_RANGE:
throw RangeException("An invalid page-mode was set.");
case HPDF_PAGE_NUM_STYLE_OUT_OF_RANGE:
throw RangeException("An invalid page-num-style was set.");
case HPDF_ANNOT_INVALID_ICON:
throw InvalidArgumentException("An invalid icon was set.");
case HPDF_ANNOT_INVALID_BORDER_STYLE:
throw InvalidArgumentException("An invalid border-style was set.");
case HPDF_PAGE_INVALID_DIRECTION:
throw InvalidArgumentException("An invalid page-direction was set.");
case HPDF_INVALID_FONT:
throw InvalidArgumentException("An invalid font-handle was specified. ");
default:
throw PDFException();
}
}
POCO_IMPLEMENT_EXCEPTION(PDFException, Poco::RuntimeException, "PDF Base Exception")
POCO_IMPLEMENT_EXCEPTION(PDFCreateException, PDFException, "PDF creation failed")
} } // namespace Poco::PDF
Loading...
举报
举报成功
我们将于2个工作日内通过站内信反馈结果给你!
请认真填写举报原因,尽可能描述详细。
请选择举报类型
取消
发送
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

简介

mirror of poco on github
暂无标签
BSL-1.0
使用 BSL-1.0 开源许可协议
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
编辑仓库简介
简介内容
主页
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/cpp_workspace/poco.git
git@gitee.com:cpp_workspace/poco.git
cpp_workspace
poco
poco
master
点此查找更多帮助

搜索帮助

评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册

AltStyle によって変換されたページ (->オリジナル) /