Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
8aeaf1de
Commit
8aeaf1de
authored
May 04, 2011
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Прошёлся по вылавливаниям исключений. Добавил ловушку для std::exception
parent
d9586f64
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
24 additions
and
17 deletions
+24
-17
mbtcpserver.cc
Utilities/MBTester/mbtcpserver.cc
+2
-2
mbtcptester.cc
Utilities/MBTester/mbtcptester.cc
+2
-2
mbslave.cc
extensions/ModbusSlave/mbslave.cc
+2
-2
smemory.cc
extensions/SharedMemory/smemory.cc
+6
-2
UNetReceiver.cc
extensions/UNet2/UNetReceiver.cc
+4
-4
UNetSender.cc
extensions/UNet2/UNetSender.cc
+4
-0
unet2-tester.cc
extensions/UNet2/unet2-tester.cc
+2
-3
ModbusTCPServer.cc
src/Communications/Modbus/ModbusTCPServer.cc
+2
-2
No files found.
Utilities/MBTester/mbtcpserver.cc
View file @
8aeaf1de
...
@@ -113,9 +113,9 @@ int main( int argc, char **argv )
...
@@ -113,9 +113,9 @@ int main( int argc, char **argv )
{
{
cerr
<<
"(mbtcpserver): "
<<
ex
<<
endl
;
cerr
<<
"(mbtcpserver): "
<<
ex
<<
endl
;
}
}
catch
(
ost
::
SockException
&
e
)
catch
(
std
::
exception
&
e
)
{
{
cerr
<<
e
.
getString
()
<<
": "
<<
e
.
getSystemErrorString
()
<<
endl
;
cerr
<<
"(mbtcpserver): "
<<
e
.
what
()
<<
endl
;
}
}
catch
(...)
catch
(...)
{
{
...
...
Utilities/MBTester/mbtcptester.cc
View file @
8aeaf1de
...
@@ -423,9 +423,9 @@ int main( int argc, char **argv )
...
@@ -423,9 +423,9 @@ int main( int argc, char **argv )
{
{
cerr
<<
"(mbtester): "
<<
ex
<<
endl
;
cerr
<<
"(mbtester): "
<<
ex
<<
endl
;
}
}
catch
(
ost
::
SockException
&
e
)
catch
(
std
::
exception
&
e
)
{
{
cerr
<<
e
.
getString
()
<<
": "
<<
e
.
getSystemErrorString
()
<<
endl
;
cerr
<<
"(mbtester): "
<<
e
.
what
()
<<
endl
;
}
}
catch
(...)
catch
(...)
{
{
...
...
extensions/ModbusSlave/mbslave.cc
View file @
8aeaf1de
...
@@ -86,9 +86,9 @@ int main(int argc, const char **argv)
...
@@ -86,9 +86,9 @@ int main(int argc, const char **argv)
{
{
dlog
[
Debug
::
CRIT
]
<<
"(mbslave): "
<<
ex
<<
endl
;
dlog
[
Debug
::
CRIT
]
<<
"(mbslave): "
<<
ex
<<
endl
;
}
}
catch
(
ost
::
SockE
xception
&
e
)
catch
(
std
::
e
xception
&
e
)
{
{
dlog
[
Debug
::
CRIT
]
<<
e
.
getString
()
<<
": "
<<
e
.
getSystemErrorString
()
<<
endl
;
dlog
[
Debug
::
CRIT
]
<<
"(mbslave): "
<<
e
.
what
()
<<
endl
;
}
}
catch
(...)
catch
(...)
{
{
...
...
extensions/SharedMemory/smemory.cc
View file @
8aeaf1de
...
@@ -42,14 +42,18 @@ int main(int argc, const char **argv)
...
@@ -42,14 +42,18 @@ int main(int argc, const char **argv)
// pause(); // пауза, чтобы дочерние потоки успели завершить работу
// pause(); // пауза, чтобы дочерние потоки успели завершить работу
return
0
;
return
0
;
}
}
catch
(
SystemError
&
err
)
catch
(
SystemError
&
err
)
{
{
unideb
[
Debug
::
CRIT
]
<<
"(smemory): "
<<
err
<<
endl
;
unideb
[
Debug
::
CRIT
]
<<
"(smemory): "
<<
err
<<
endl
;
}
}
catch
(
Exception
&
ex
)
catch
(
Exception
&
ex
)
{
{
unideb
[
Debug
::
CRIT
]
<<
"(smemory): "
<<
ex
<<
endl
;
unideb
[
Debug
::
CRIT
]
<<
"(smemory): "
<<
ex
<<
endl
;
}
}
catch
(
std
::
exception
&
e
)
{
unideb
[
Debug
::
CRIT
]
<<
"(smemory): "
<<
e
.
what
()
<<
endl
;
}
catch
(...)
catch
(...)
{
{
unideb
[
Debug
::
CRIT
]
<<
"(smemory): catch(...)"
<<
endl
;
unideb
[
Debug
::
CRIT
]
<<
"(smemory): catch(...)"
<<
endl
;
...
...
extensions/UNet2/UNetReceiver.cc
View file @
8aeaf1de
...
@@ -259,14 +259,14 @@ void UNetReceiver::receive()
...
@@ -259,14 +259,14 @@ void UNetReceiver::receive()
if
(
recv
()
)
if
(
recv
()
)
ptRecvTimeout
.
reset
();
ptRecvTimeout
.
reset
();
}
}
catch
(
ost
::
SockException
&
e
)
{
dlog
[
Debug
::
WARN
]
<<
myname
<<
"(receive): "
<<
e
.
getString
()
<<
endl
;
}
catch
(
UniSetTypes
::
Exception
&
ex
)
catch
(
UniSetTypes
::
Exception
&
ex
)
{
{
dlog
[
Debug
::
WARN
]
<<
myname
<<
"(receive): "
<<
ex
<<
std
::
endl
;
dlog
[
Debug
::
WARN
]
<<
myname
<<
"(receive): "
<<
ex
<<
std
::
endl
;
}
}
catch
(
std
::
exception
&
e
)
{
dlog
[
Debug
::
WARN
]
<<
myname
<<
"(receive): "
<<
e
.
what
()
<<
std
::
endl
;
}
catch
(...)
catch
(...)
{
{
dlog
[
Debug
::
WARN
]
<<
myname
<<
"(receive): catch ..."
<<
std
::
endl
;
dlog
[
Debug
::
WARN
]
<<
myname
<<
"(receive): catch ..."
<<
std
::
endl
;
...
...
extensions/UNet2/UNetSender.cc
View file @
8aeaf1de
...
@@ -161,6 +161,10 @@ void UNetSender::send()
...
@@ -161,6 +161,10 @@ void UNetSender::send()
{
{
dlog
[
Debug
::
WARN
]
<<
myname
<<
"(send): "
<<
ex
<<
std
::
endl
;
dlog
[
Debug
::
WARN
]
<<
myname
<<
"(send): "
<<
ex
<<
std
::
endl
;
}
}
catch
(
std
::
exception
&
e
)
{
dlog
[
Debug
::
WARN
]
<<
myname
<<
"(send): "
<<
e
.
what
()
<<
std
::
endl
;
}
catch
(...)
catch
(...)
{
{
dlog
[
Debug
::
WARN
]
<<
myname
<<
"(send): catch ..."
<<
std
::
endl
;
dlog
[
Debug
::
WARN
]
<<
myname
<<
"(send): catch ..."
<<
std
::
endl
;
...
...
extensions/UNet2/unet2-tester.cc
View file @
8aeaf1de
...
@@ -289,10 +289,9 @@ int main(int argc, char* argv[])
...
@@ -289,10 +289,9 @@ int main(int argc, char* argv[])
break
;
break
;
}
}
}
}
catch
(
ost
::
SockE
xception
&
e
)
catch
(
std
::
e
xception
&
e
)
{
{
cerr
<<
"(main): "
<<
e
.
getString
()
<<
" ("
<<
addr
<<
")"
<<
endl
;
cerr
<<
"(main): "
<<
e
.
what
()
<<
endl
;
return
1
;
}
}
catch
(
...
)
catch
(
...
)
{
{
...
...
src/Communications/Modbus/ModbusTCPServer.cc
View file @
8aeaf1de
...
@@ -135,9 +135,9 @@ mbErrCode ModbusTCPServer::receive( ModbusRTU::ModbusAddr addr, timeout_t timeou
...
@@ -135,9 +135,9 @@ mbErrCode ModbusTCPServer::receive( ModbusRTU::ModbusAddr addr, timeout_t timeou
tcp
.
disconnect
();
tcp
.
disconnect
();
}
}
}
}
catch
(
ost
::
Sock
Exception
&
e
)
catch
(
ost
::
Exception
&
e
)
{
{
cout
<<
e
.
getString
()
<<
": "
<<
e
.
getSystemErrorString
()
<<
endl
;
cout
<<
"(ModbusTCPServer): "
<<
e
.
what
()
<<
endl
;
return
erInternalErrorCode
;
return
erInternalErrorCode
;
}
}
...
...
Write
Preview
Markdown
is supported
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