Fawkes API Fawkes Development Version
cam_exceptions.cpp
1
2/***************************************************************************
3 * cam_exceptions.cpp - Camera-related exceptions
4 *
5 * Created: Sat Apr 14 23:07:12 2007
6 * Copyright 2005-2007 Tim Niemueller [www.niemueller.de]
7 *
8 ****************************************************************************/
9
10/* This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version. A runtime exception applies to
14 * this software (see LICENSE.GPL_WRE file mentioned below for details).
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Library General Public License for more details.
20 *
21 * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22 */
23
24#include <fvcams/cam_exceptions.h>
25
26using namespace fawkes;
27
28namespace firevision {
29
30/** @class CameraNotOpenedException <fvcams/cam_exceptions.h>
31 * Camera not opened exception.
32 * Throw this exception if an operations was requested on a camera that is
33 * not possible if the camera has not been properly opened before.
34 */
35
36/** Constructor. */
38{
39}
40
41/** @class CameraNotStartedException <fvcams/cam_exceptions.h>
42 * Camera not started exception.
43 * Throw this exception if an operations was requested on a camera that is
44 * not possible if the camera has not been properly started before.
45 */
46
47/** Constructor. */
49{
50}
51
52/** @class CaptureException <fvcams/cam_exceptions.h>
53 * Capturing a frame failed.
54 * This exception is thrown if a camera failed to retrieve a new image from
55 * the camera.
56 */
57
58/** Constructor.
59 * @param format format of the descriptive message
60 */
62{
63 va_list va;
64 va_start(va, format);
65 append_va(format, va);
66 va_end(va);
67}
68
69/** @class UnknownCameraTypeException <fvcams/cam_exceptions.h>
70 * Unknown camera type exception.
71 * Thrown if the requested camera has not been recognized or the needed
72 * libraries were not available at compile time.
73 */
74
75/** Constructor.
76 * @param msg optional extra message
77 */
79: Exception("Unknown camera type")
80{
81 append(msg);
82}
83
84/** @class UnknownCameraException <fvcams/cam_exceptions.h>
85 * Unknown camera exception.
86 * Thrown if the requested camera is not available.
87 */
88
89/** Constructor.
90 * @param msg optional extra message
91 */
93{
94 append(msg);
95}
96
97/** @class UnknownCameraControlTypeException <fvcams/cam_exceptions.h>
98 * Unknown camera control exception.
99 * Thrown if the requested camera control has not been recognized or the needed
100 * libraries were not available at compile time.
101 */
102
103/** Constructor.
104 * @param msg optional extra message
105 */
107: Exception("Unknown camera control type")
108{
109 append(msg);
110}
111
112} // end namespace firevision
Base class for exceptions in Fawkes.
Definition: exception.h:36
void append_va(const char *format, va_list va) noexcept
Append messages to the message list.
Definition: exception.cpp:353
void append(const char *format,...) noexcept
Append messages to the message list.
Definition: exception.cpp:333
CaptureException(const char *format,...)
Constructor.
UnknownCameraControlTypeException(const char *msg=0)
Constructor.
UnknownCameraException(const char *msg=0)
Constructor.
UnknownCameraTypeException(const char *msg=0)
Constructor.
Fawkes library namespace.