anthony | 756cd0d | 2012-04-08 12:41:44 +0000 | [diff] [blame] | 1 | /* |
| 2 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 3 | % % |
| 4 | % % |
| 5 | % % |
| 6 | % M M AA GGG III CCC W W AA N N DDD CCC L III % |
| 7 | % MM MM A A G I C W W A A NN N D D C L I % |
| 8 | % M M M AAAA G GG I C W W W AAAA N N N D D C L I % |
| 9 | % M M A A G G I C W W W A A N NN D D C L I % |
| 10 | % M M A A GGG III CCC W W A A N N DDD CCC LLLL III % |
| 11 | % % |
| 12 | % % |
| 13 | % WandCLI Structure Methods % |
| 14 | % % |
| 15 | % Dragon Computing % |
| 16 | % Anthony Thyssen % |
| 17 | % April 2011 % |
| 18 | % % |
| 19 | % % |
cristy | b56bb24 | 2014-11-25 17:12:48 +0000 | [diff] [blame] | 20 | % Copyright 1999-2015 ImageMagick Studio LLC, a non-profit organization % |
anthony | 756cd0d | 2012-04-08 12:41:44 +0000 | [diff] [blame] | 21 | % dedicated to making software imaging solutions freely available. % |
| 22 | % % |
| 23 | % You may not use this file except in compliance with the License. You may % |
| 24 | % obtain a copy of the License at % |
| 25 | % % |
| 26 | % http://www.imagemagick.org/script/license.php % |
| 27 | % % |
| 28 | % Unless required by applicable law or agreed to in writing, software % |
| 29 | % distributed under the License is distributed on an "AS IS" BASIS, % |
| 30 | % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. % |
| 31 | % See the License for the specific language governing permissions and % |
| 32 | % limitations under the License. % |
| 33 | % % |
| 34 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 35 | % |
| 36 | % General methds for handling the WandCLI structure used for Command Line. |
| 37 | % |
| 38 | % Anthony Thyssen, April 2011 |
| 39 | */ |
| 40 | |
| 41 | /* |
| 42 | Include declarations. |
| 43 | */ |
| 44 | #include "MagickWand/studio.h" |
| 45 | #include "MagickWand/MagickWand.h" |
anthony | ea068a5 | 2012-04-09 05:46:25 +0000 | [diff] [blame] | 46 | #include "MagickWand/wand.h" |
anthony | 756cd0d | 2012-04-08 12:41:44 +0000 | [diff] [blame] | 47 | #include "MagickWand/magick-wand-private.h" |
| 48 | #include "MagickWand/wandcli.h" |
| 49 | #include "MagickWand/wandcli-private.h" |
anthony | 5216f82 | 2012-04-10 13:02:37 +0000 | [diff] [blame] | 50 | #include "MagickCore/exception.h" |
anthony | 756cd0d | 2012-04-08 12:41:44 +0000 | [diff] [blame] | 51 | |
| 52 | /* |
| 53 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 54 | % % |
| 55 | % % |
| 56 | % % |
| 57 | + A c q u i r e W a n d C L I % |
| 58 | % % |
| 59 | % % |
| 60 | % % |
| 61 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 62 | % |
| 63 | % AcquireMagickCLI() creates a new CLI wand (an expanded form of Magick |
| 64 | % Wand). The given image_info and exception is included as is if provided. |
| 65 | % |
| 66 | % Use DestroyMagickCLI() to dispose of the CLI wand when it is no longer |
| 67 | % needed. |
| 68 | % |
| 69 | % The format of the NewMagickWand method is: |
| 70 | % |
| 71 | % MagickCLI *AcquireMagickCLI(ImageInfo *image_info, |
| 72 | % ExceptionInfo *exception) |
| 73 | % |
| 74 | */ |
| 75 | WandExport MagickCLI *AcquireMagickCLI(ImageInfo *image_info, |
| 76 | ExceptionInfo *exception) |
| 77 | { |
| 78 | MagickCLI |
| 79 | *cli_wand; |
| 80 | |
| 81 | /* precaution - as per NewMagickWand() */ |
| 82 | { |
| 83 | size_t depth = MAGICKCORE_QUANTUM_DEPTH; |
| 84 | const char *quantum = GetMagickQuantumDepth(&depth); |
| 85 | if (depth != MAGICKCORE_QUANTUM_DEPTH) |
| 86 | ThrowWandFatalException(WandError,"QuantumDepthMismatch",quantum); |
| 87 | } |
| 88 | |
| 89 | /* allocate memory for MgaickCLI */ |
| 90 | cli_wand=(MagickCLI *) AcquireMagickMemory(sizeof(*cli_wand)); |
| 91 | if (cli_wand == (MagickCLI *) NULL) |
dirk | a75a707 | 2014-03-13 19:02:15 +0000 | [diff] [blame] | 92 | ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed", |
| 93 | GetExceptionMessage(errno)); |
anthony | 756cd0d | 2012-04-08 12:41:44 +0000 | [diff] [blame] | 94 | |
| 95 | /* Initialize Wand Part of MagickCLI |
| 96 | FUTURE: this is a repeat of code from NewMagickWand() |
| 97 | However some parts may be given fro man external source! |
| 98 | */ |
| 99 | cli_wand->wand.id=AcquireWandId(); |
cristy | 151b66d | 2015-04-15 10:50:31 +0000 | [diff] [blame] | 100 | (void) FormatLocaleString(cli_wand->wand.name,MagickPathExtent, |
anthony | 756cd0d | 2012-04-08 12:41:44 +0000 | [diff] [blame] | 101 | "%s-%.20g","MagickWandCLI", (double) cli_wand->wand.id); |
| 102 | cli_wand->wand.images=NewImageList(); |
cristy | f432c63 | 2014-12-07 15:11:28 +0000 | [diff] [blame] | 103 | if ( image_info == (ImageInfo *) NULL) |
anthony | 756cd0d | 2012-04-08 12:41:44 +0000 | [diff] [blame] | 104 | cli_wand->wand.image_info=AcquireImageInfo(); |
| 105 | else |
| 106 | cli_wand->wand.image_info=image_info; |
cristy | f432c63 | 2014-12-07 15:11:28 +0000 | [diff] [blame] | 107 | if ( exception == (ExceptionInfo *) NULL) |
anthony | 756cd0d | 2012-04-08 12:41:44 +0000 | [diff] [blame] | 108 | cli_wand->wand.exception=AcquireExceptionInfo(); |
| 109 | else |
| 110 | cli_wand->wand.exception=exception; |
| 111 | cli_wand->wand.debug=IsEventLogging(); |
cristy | e1c94d9 | 2015-06-28 12:16:33 +0000 | [diff] [blame] | 112 | cli_wand->wand.signature=MagickWandSignature; |
anthony | 756cd0d | 2012-04-08 12:41:44 +0000 | [diff] [blame] | 113 | |
| 114 | /* Initialize CLI Part of MagickCLI */ |
| 115 | cli_wand->draw_info=CloneDrawInfo(cli_wand->wand.image_info,(DrawInfo *) NULL); |
| 116 | cli_wand->quantize_info=AcquireQuantizeInfo(cli_wand->wand.image_info); |
anthony | 464f1c4 | 2012-04-22 08:51:01 +0000 | [diff] [blame] | 117 | cli_wand->process_flags=MagickCommandOptionFlags; /* assume "magick" CLI */ |
cristy | f432c63 | 2014-12-07 15:11:28 +0000 | [diff] [blame] | 118 | cli_wand->command=(const OptionInfo *) NULL; /* no option at this time */ |
| 119 | cli_wand->image_list_stack=(Stack *) NULL; |
| 120 | cli_wand->image_info_stack=(Stack *) NULL; |
anthony | 5216f82 | 2012-04-10 13:02:37 +0000 | [diff] [blame] | 121 | |
| 122 | /* default exception location... |
| 123 | EG: sprintf(locaiton, filename, line, column); |
| 124 | */ |
anthony | 464f1c4 | 2012-04-22 08:51:01 +0000 | [diff] [blame] | 125 | cli_wand->location="from \"%s\""; /* location format using arguments: */ |
| 126 | /* filename, line, column */ |
| 127 | cli_wand->filename="unknown"; /* script filename, unknown source */ |
| 128 | cli_wand->line=0; /* line from script OR CLI argument */ |
| 129 | cli_wand->column=0; /* column from script */ |
anthony | 756cd0d | 2012-04-08 12:41:44 +0000 | [diff] [blame] | 130 | |
cristy | e1c94d9 | 2015-06-28 12:16:33 +0000 | [diff] [blame] | 131 | cli_wand->signature=MagickWandSignature; |
anthony | 756cd0d | 2012-04-08 12:41:44 +0000 | [diff] [blame] | 132 | if (IfMagickTrue(cli_wand->wand.debug)) |
| 133 | (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",cli_wand->wand.name); |
| 134 | return(cli_wand); |
| 135 | } |
| 136 | |
| 137 | /* |
| 138 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 139 | % % |
| 140 | % % |
| 141 | % % |
| 142 | + D e s t r o y W a n d C L I % |
| 143 | % % |
| 144 | % % |
| 145 | % % |
| 146 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 147 | % |
| 148 | % DestroyMagickCLI() destorys everything in a CLI wand, including image_info |
| 149 | % and any exceptions, if still present in the wand. |
| 150 | % |
| 151 | % The format of the NewMagickWand method is: |
| 152 | % |
| 153 | % MagickWand *DestroyMagickCLI() |
| 154 | % Exception *exception) |
| 155 | % |
| 156 | */ |
| 157 | WandExport MagickCLI *DestroyMagickCLI(MagickCLI *cli_wand) |
| 158 | { |
| 159 | Stack |
| 160 | *node; |
| 161 | |
| 162 | assert(cli_wand != (MagickCLI *) NULL); |
cristy | e1c94d9 | 2015-06-28 12:16:33 +0000 | [diff] [blame] | 163 | assert(cli_wand->signature == MagickWandSignature); |
| 164 | assert(cli_wand->wand.signature == MagickWandSignature); |
anthony | 756cd0d | 2012-04-08 12:41:44 +0000 | [diff] [blame] | 165 | if (IfMagickTrue(cli_wand->wand.debug)) |
| 166 | (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",cli_wand->wand.name); |
| 167 | |
| 168 | /* Destroy CLI part of MagickCLI */ |
| 169 | if (cli_wand->draw_info != (DrawInfo *) NULL ) |
| 170 | cli_wand->draw_info=DestroyDrawInfo(cli_wand->draw_info); |
| 171 | if (cli_wand->quantize_info != (QuantizeInfo *) NULL ) |
| 172 | cli_wand->quantize_info=DestroyQuantizeInfo(cli_wand->quantize_info); |
cristy | f432c63 | 2014-12-07 15:11:28 +0000 | [diff] [blame] | 173 | while(cli_wand->image_list_stack != (Stack *) NULL) |
anthony | 756cd0d | 2012-04-08 12:41:44 +0000 | [diff] [blame] | 174 | { |
| 175 | node=cli_wand->image_list_stack; |
| 176 | cli_wand->image_list_stack=node->next; |
| 177 | (void) DestroyImageList((Image *)node->data); |
| 178 | (void) RelinquishMagickMemory(node); |
| 179 | } |
cristy | f432c63 | 2014-12-07 15:11:28 +0000 | [diff] [blame] | 180 | while(cli_wand->image_info_stack != (Stack *) NULL) |
anthony | 756cd0d | 2012-04-08 12:41:44 +0000 | [diff] [blame] | 181 | { |
| 182 | node=cli_wand->image_info_stack; |
| 183 | cli_wand->image_info_stack=node->next; |
| 184 | (void) DestroyImageInfo((ImageInfo *)node->data); |
| 185 | (void) RelinquishMagickMemory(node); |
| 186 | } |
cristy | e1c94d9 | 2015-06-28 12:16:33 +0000 | [diff] [blame] | 187 | cli_wand->signature=(~MagickWandSignature); |
anthony | 756cd0d | 2012-04-08 12:41:44 +0000 | [diff] [blame] | 188 | |
| 189 | /* Destroy Wand part MagickCLI */ |
| 190 | cli_wand->wand.images=DestroyImageList(cli_wand->wand.images); |
| 191 | if (cli_wand->wand.image_info != (ImageInfo *) NULL ) |
| 192 | cli_wand->wand.image_info=DestroyImageInfo(cli_wand->wand.image_info); |
| 193 | if (cli_wand->wand.exception != (ExceptionInfo *) NULL ) |
| 194 | cli_wand->wand.exception=DestroyExceptionInfo(cli_wand->wand.exception); |
| 195 | RelinquishWandId(cli_wand->wand.id); |
cristy | e1c94d9 | 2015-06-28 12:16:33 +0000 | [diff] [blame] | 196 | cli_wand->wand.signature=(~MagickWandSignature); |
anthony | 756cd0d | 2012-04-08 12:41:44 +0000 | [diff] [blame] | 197 | |
cristy | f432c63 | 2014-12-07 15:11:28 +0000 | [diff] [blame] | 198 | return((MagickCLI *) NULL); |
anthony | 756cd0d | 2012-04-08 12:41:44 +0000 | [diff] [blame] | 199 | } |
| 200 | |
| 201 | /* |
| 202 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 203 | % % |
| 204 | % % |
| 205 | % % |
| 206 | + C L I C a t c h E x c e p t i o n % |
| 207 | % % |
| 208 | % % |
| 209 | % % |
| 210 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 211 | % |
| 212 | % CLICatchException() will report exceptions, either just non-fatal warnings |
| 213 | % only, or all errors, according to 'all_execeptions' boolean argument. |
| 214 | % |
anthony | 464f1c4 | 2012-04-22 08:51:01 +0000 | [diff] [blame] | 215 | % The function returns true if errors are fatal, in which case the caller |
anthony | 756cd0d | 2012-04-08 12:41:44 +0000 | [diff] [blame] | 216 | % should abort and re-call with an 'all_exceptions' argument of true before |
| 217 | % quitting. |
| 218 | % |
| 219 | % The cut-off level between fatal and non-fatal may be controlled by options |
| 220 | % (FUTURE), but defaults to 'Error' exceptions. |
| 221 | % |
| 222 | % The format of the CLICatchException method is: |
| 223 | % |
| 224 | % MagickBooleanType CLICatchException(MagickCLI *cli_wand, |
| 225 | % const MagickBooleanType all_exceptions ); |
| 226 | % |
anthony | 464f1c4 | 2012-04-22 08:51:01 +0000 | [diff] [blame] | 227 | % Arguments are |
| 228 | % |
| 229 | % o cli_wand: The Wand CLI that holds the exception Information |
| 230 | % |
| 231 | % o all_exceptions: Report all exceptions, including the fatal one |
| 232 | % |
anthony | 756cd0d | 2012-04-08 12:41:44 +0000 | [diff] [blame] | 233 | */ |
| 234 | WandExport MagickBooleanType CLICatchException(MagickCLI *cli_wand, |
dirk | b9dbc29 | 2015-07-26 09:50:00 +0000 | [diff] [blame^] | 235 | const MagickBooleanType all_exceptions) |
anthony | 756cd0d | 2012-04-08 12:41:44 +0000 | [diff] [blame] | 236 | { |
| 237 | MagickBooleanType |
| 238 | status; |
dirk | b9dbc29 | 2015-07-26 09:50:00 +0000 | [diff] [blame^] | 239 | |
anthony | 756cd0d | 2012-04-08 12:41:44 +0000 | [diff] [blame] | 240 | assert(cli_wand != (MagickCLI *) NULL); |
cristy | e1c94d9 | 2015-06-28 12:16:33 +0000 | [diff] [blame] | 241 | assert(cli_wand->signature == MagickWandSignature); |
| 242 | assert(cli_wand->wand.signature == MagickWandSignature); |
dirk | b9dbc29 | 2015-07-26 09:50:00 +0000 | [diff] [blame^] | 243 | if (cli_wand->wand.debug != MagickFalse) |
anthony | 756cd0d | 2012-04-08 12:41:44 +0000 | [diff] [blame] | 244 | (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",cli_wand->wand.name); |
| 245 | |
| 246 | // FUTURE: '-regard_warning' should make this more sensitive. |
| 247 | // Note pipelined options may like more control over this level |
| 248 | |
dirk | b9dbc29 | 2015-07-26 09:50:00 +0000 | [diff] [blame^] | 249 | status=cli_wand->wand.exception->severity > ErrorException ? MagickTrue : |
| 250 | MagickFalse; |
anthony | 756cd0d | 2012-04-08 12:41:44 +0000 | [diff] [blame] | 251 | |
dirk | b9dbc29 | 2015-07-26 09:50:00 +0000 | [diff] [blame^] | 252 | if ((status == MagickFalse) || (all_exceptions != MagickFalse)) |
anthony | 756cd0d | 2012-04-08 12:41:44 +0000 | [diff] [blame] | 253 | CatchException(cli_wand->wand.exception); /* output and clear exceptions */ |
| 254 | |
cristy | 220c4d5 | 2013-11-27 19:31:32 +0000 | [diff] [blame] | 255 | return(status); |
anthony | 756cd0d | 2012-04-08 12:41:44 +0000 | [diff] [blame] | 256 | } |
anthony | 5216f82 | 2012-04-10 13:02:37 +0000 | [diff] [blame] | 257 | |
| 258 | /* |
| 259 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 260 | % % |
| 261 | % % |
| 262 | % % |
anthony | a322a83 | 2013-04-27 06:28:03 +0000 | [diff] [blame] | 263 | + C L I L o g E v e n t % |
| 264 | % % |
| 265 | % % |
| 266 | % % |
| 267 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 268 | % |
| 269 | % CLILogEvent() is a wrapper around LogMagickEvent(), adding to it the |
| 270 | % location of the option that is (about) to be executed. |
| 271 | % |
| 272 | */ |
| 273 | WandExport MagickBooleanType CLILogEvent(MagickCLI *cli_wand, |
| 274 | const LogEventType type,const char *module,const char *function, |
| 275 | const size_t line,const char *format,...) |
| 276 | { |
| 277 | char |
cristy | 151b66d | 2015-04-15 10:50:31 +0000 | [diff] [blame] | 278 | new_format[MagickPathExtent]; |
anthony | a322a83 | 2013-04-27 06:28:03 +0000 | [diff] [blame] | 279 | |
| 280 | MagickBooleanType |
| 281 | status; |
| 282 | |
| 283 | va_list |
| 284 | operands; |
| 285 | |
| 286 | /* HACK - prepend the CLI location to format string. |
| 287 | The better way would be add more arguments to to the 'va' oparands |
| 288 | list, but that does not appear to be possible! So we do some |
| 289 | pre-formating of the location info here. |
| 290 | */ |
cristy | 151b66d | 2015-04-15 10:50:31 +0000 | [diff] [blame] | 291 | (void) FormatLocaleString(new_format,MagickPathExtent,cli_wand->location, |
anthony | a322a83 | 2013-04-27 06:28:03 +0000 | [diff] [blame] | 292 | cli_wand->filename, cli_wand->line, cli_wand->column); |
cristy | 151b66d | 2015-04-15 10:50:31 +0000 | [diff] [blame] | 293 | (void) ConcatenateMagickString(new_format," ",MagickPathExtent); |
| 294 | (void) ConcatenateMagickString(new_format,format,MagickPathExtent); |
anthony | a322a83 | 2013-04-27 06:28:03 +0000 | [diff] [blame] | 295 | |
| 296 | va_start(operands,format); |
| 297 | status=LogMagickEventList(type,module,function,line,new_format,operands); |
| 298 | va_end(operands); |
| 299 | |
| 300 | |
cristy | 220c4d5 | 2013-11-27 19:31:32 +0000 | [diff] [blame] | 301 | return(status); |
anthony | a322a83 | 2013-04-27 06:28:03 +0000 | [diff] [blame] | 302 | } |
| 303 | |
| 304 | /* |
| 305 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 306 | % % |
| 307 | % % |
| 308 | % % |
anthony | 5216f82 | 2012-04-10 13:02:37 +0000 | [diff] [blame] | 309 | + C L I T h r o w E x c e p t i o n % |
| 310 | % % |
| 311 | % % |
| 312 | % % |
| 313 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 314 | % |
anthony | a322a83 | 2013-04-27 06:28:03 +0000 | [diff] [blame] | 315 | % CLIThrowException() is a wrapper around ThrowMagickException(), adding to |
anthony | 5216f82 | 2012-04-10 13:02:37 +0000 | [diff] [blame] | 316 | % it the location of the option that caused the exception to occur. |
| 317 | */ |
| 318 | WandExport MagickBooleanType CLIThrowException(MagickCLI *cli_wand, |
| 319 | const char *module,const char *function,const size_t line, |
| 320 | const ExceptionType severity,const char *tag,const char *format,...) |
| 321 | { |
| 322 | char |
cristy | 151b66d | 2015-04-15 10:50:31 +0000 | [diff] [blame] | 323 | new_format[MagickPathExtent]; |
anthony | 5216f82 | 2012-04-10 13:02:37 +0000 | [diff] [blame] | 324 | |
| 325 | size_t |
| 326 | len; |
| 327 | |
| 328 | MagickBooleanType |
| 329 | status; |
| 330 | |
| 331 | va_list |
| 332 | operands; |
| 333 | |
| 334 | /* HACK - append location to format string. |
anthony | a322a83 | 2013-04-27 06:28:03 +0000 | [diff] [blame] | 335 | The better way would be add more arguments to to the 'va' oparands |
| 336 | list, but that does not appear to be possible! So we do some |
| 337 | pre-formating of the location info here. |
anthony | 5216f82 | 2012-04-10 13:02:37 +0000 | [diff] [blame] | 338 | */ |
cristy | 151b66d | 2015-04-15 10:50:31 +0000 | [diff] [blame] | 339 | (void) CopyMagickString(new_format,format,MagickPathExtent); |
| 340 | (void) ConcatenateMagickString(new_format," ",MagickPathExtent); |
anthony | 5216f82 | 2012-04-10 13:02:37 +0000 | [diff] [blame] | 341 | |
| 342 | len=strlen(new_format); |
cristy | 151b66d | 2015-04-15 10:50:31 +0000 | [diff] [blame] | 343 | (void) FormatLocaleString(new_format+len,MagickPathExtent-len,cli_wand->location, |
anthony | 5216f82 | 2012-04-10 13:02:37 +0000 | [diff] [blame] | 344 | cli_wand->filename, cli_wand->line, cli_wand->column); |
| 345 | |
| 346 | va_start(operands,format); |
| 347 | status=ThrowMagickExceptionList(cli_wand->wand.exception, |
| 348 | module,function,line, |
| 349 | severity,tag,new_format,operands); |
| 350 | va_end(operands); |
cristy | 220c4d5 | 2013-11-27 19:31:32 +0000 | [diff] [blame] | 351 | return(status); |
anthony | 5216f82 | 2012-04-10 13:02:37 +0000 | [diff] [blame] | 352 | } |