Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simonstrator
PeerfactSim.KOM
Commits
8b386330
Commit
8b386330
authored
Jul 02, 2015
by
Björn Richerzhagen
Browse files
Relaxing assertion errors on missing net configuration
parent
970dcd7e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/common/DefaultHost.java
View file @
8b386330
...
...
@@ -30,6 +30,8 @@ import de.tud.kom.p2psim.api.linklayer.LinkLayer;
import
de.tud.kom.p2psim.api.network.NetLayer
;
import
de.tud.kom.p2psim.api.network.SimNetworkComponent
;
import
de.tud.kom.p2psim.api.topology.TopologyComponent
;
import
de.tudarmstadt.maki.simonstrator.api.Monitor
;
import
de.tudarmstadt.maki.simonstrator.api.Monitor.Level
;
import
de.tudarmstadt.maki.simonstrator.api.component.ComponentNotAvailableException
;
import
de.tudarmstadt.maki.simonstrator.api.component.HostComponent
;
import
de.tudarmstadt.maki.simonstrator.api.component.transport.TransportComponent
;
...
...
@@ -108,7 +110,7 @@ public class DefaultHost implements SimHost {
try
{
networkComponent
=
getComponent
(
SimNetworkComponent
.
class
);
}
catch
(
ComponentNotAvailableException
e
)
{
throw
new
AssertionError
(
"No NetworkComponent found
!"
);
Monitor
.
log
(
DefaultHost
.
class
,
Level
.
ERROR
,
"No NetworkComponent found in the current configuration
!"
);
}
}
return
networkComponent
;
...
...
@@ -120,7 +122,7 @@ public class DefaultHost implements SimHost {
try
{
transportComponent
=
getComponent
(
TransportComponent
.
class
);
}
catch
(
ComponentNotAvailableException
e
)
{
throw
new
AssertionError
(
"No TransportComponent found
!"
);
Monitor
.
log
(
DefaultHost
.
class
,
Level
.
ERROR
,
"No TransportComponent found in the current configuration
!"
);
}
}
return
transportComponent
;
...
...
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