Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
9a91402a
Commit
9a91402a
authored
Mar 03, 2014
by
Steven Murray
Browse files
Added BadAlloc exception and finished AcceptConnectionInterrupted
parent
bbc3c013
Changes
8
Hide whitespace changes
Inline
Side-by-side
castor/CMakeLists.txt
View file @
9a91402a
...
...
@@ -323,6 +323,7 @@ if (${COMPILE_SERVER} STREQUAL "1")
install
(
FILES
exception/AcceptConnectionInterrupted.hpp
exception/Backtrace.hpp
exception/BadAlloc.hpp
exception/CommandLineNotParsed.hpp
exception/Communication.hpp
exception/Exception.hpp
...
...
castor/exception/BadAlloc.cpp
0 → 100644
View file @
9a91402a
/******************************************************************************
* BadAlloc.cpp
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#include "castor/exception/BadAlloc.hpp"
#include "h/serrno.h"
// -----------------------------------------------------------------------------
// Constructor
// -----------------------------------------------------------------------------
castor
::
exception
::
BadAlloc
::
BadAlloc
()
:
castor
::
exception
::
Exception
(
SEBADALLOC
)
{
}
castor/exception/BadAlloc.hpp
0 → 100644
View file @
9a91402a
/******************************************************************************
* BadAlloc.hpp
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#ifndef CASTOR_EXCEPTION_BADALLOC_HPP
#define CASTOR_EXCEPTION_BADALLOC_HPP 1
#include "castor/exception/Exception.hpp"
namespace
castor
{
namespace
exception
{
/**
* BadAlloc.
*/
class
BadAlloc
:
public
castor
::
exception
::
Exception
{
public:
/**
* Constructor
*/
BadAlloc
();
};
// class BadAlloc
}
}
// namespace castor exception
#endif // CASTOR_EXCEPTION_BADALLOC_HPP
common/CMakeLists.txt
View file @
9a91402a
...
...
@@ -35,6 +35,7 @@ set (COMMON_LIB_SRC_FILES
Csecloader.c castor1compat.c
../castor/exception/AcceptConnectionInterrupted.cpp
../castor/exception/AlreadyInitialized.cpp
../castor/exception/BadAlloc.cpp
../castor/exception/Backtrace.cpp
../castor/exception/BadVersion.cpp
../castor/exception/Busy.cpp
...
...
common/serror.c
View file @
9a91402a
...
...
@@ -71,6 +71,8 @@ char *sys_serrlist[SEMAXERR-SEBASEOFF+2]=
"Invalid number of arguments"
,
"Already initialized"
,
"Command line not parsed"
,
"Accept connection was interrupted"
,
"Failed to allocate memory"
,
"BAD ERROR NUMBER"
};
...
...
debian/castor-build-headers.install.perm
View file @
9a91402a
...
...
@@ -24,6 +24,7 @@
%attr(0644,root,root) usr/include/castor/castor/exception/AcceptConnectionInterrupted.hpp
%attr(0644,root,root) usr/include/castor/castor/exception/AlreadyInitialized.hpp
%attr(0644,root,root) usr/include/castor/castor/exception/Backtrace.hpp
%attr(0644,root,root) usr/include/castor/castor/exception/BadAlloc.hpp
%attr(0644,root,root) usr/include/castor/castor/exception/CommandLineNotParsed.hpp
%attr(0644,root,root) usr/include/castor/castor/exception/Communication.hpp
%attr(0644,root,root) usr/include/castor/castor/exception/Exception.hpp
...
...
h/serrno.h
View file @
9a91402a
...
...
@@ -82,9 +82,10 @@
#define SEINVALIDNBARGS SEBASEOFF+48
/* Invalid number of arguments */
#define SEALREADYINIT SEBASEOFF+49
/* Already initialized */
#define SECMDLNNOTPRSD SEBASEOFF+50
/* Command line not parsed */
#define SEACCPTCONNINTR SEBASEOFF+51
/* castor::io::acceptConnection() was interrupted */
#define SEACCPTCONNINTR SEBASEOFF+51
/* Accept connection was interrupted */
#define SEBADALLOC SEBASEOFF+52
/* Failed to allocate memory */
#define SEMAXERR SEBASEOFF+5
1
/* Maximum error number */
#define SEMAXERR SEBASEOFF+5
2
/* Maximum error number */
#define SERRNO (serrno - SEBASEOFF)
/* User convenience */
/*
...
...
h/serrno.man
View file @
9a91402a
...
...
@@ -205,6 +205,12 @@ The following error values might be returned by any package:
.TP
.B SECMDLNNOTPRSD
(1050) Command line not parsed
.TP
.B SEACCPTCONNINTR
(1051) Accept connection was interrupted
.TP
.B SEBADALLOC
(1052) Failed to allocate memory
.SH COPYTAPE ERRORS
None yet
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment