147 lines
3.9 KiB
HTML
147 lines
3.9 KiB
HTML
|
|
|
|
|
|
<!DOCTYPE html>
|
|
<html id="htmlId">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
|
<title>Coverage Report > ErrorType</title>
|
|
<style type="text/css">
|
|
@import "../../css/coverage.css";
|
|
@import "../../css/idea.min.css";
|
|
</style>
|
|
<script type="text/javascript" src="../../js/highlight.min.js"></script>
|
|
<script type="text/javascript" src="../../js/highlightjs-line-numbers.min.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="content">
|
|
<div class="breadCrumbs">
|
|
Current scope: <a href="../../index.html">all classes</a>
|
|
<span class="separator">|</span>
|
|
<a href="../index.html">it.polimi.ingsw.gc14</a>
|
|
</div>
|
|
|
|
<h1>Coverage Summary for Class: ErrorType (it.polimi.ingsw.gc14)</h1>
|
|
|
|
<table class="coverageStats">
|
|
<tr>
|
|
<th class="name">Class</th>
|
|
<th class="coverageStat
|
|
">
|
|
Class, %
|
|
</th>
|
|
<th class="coverageStat
|
|
">
|
|
Method, %
|
|
</th>
|
|
<th class="coverageStat
|
|
">
|
|
Line, %
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<td class="name">ErrorType</td>
|
|
<td class="coverageStat">
|
|
<span class="percent">
|
|
0%
|
|
</span>
|
|
<span class="absValue">
|
|
(0/1)
|
|
</span>
|
|
</td>
|
|
<td class="coverageStat">
|
|
<span class="percent">
|
|
0%
|
|
</span>
|
|
<span class="absValue">
|
|
(0/4)
|
|
</span>
|
|
</td>
|
|
<td class="coverageStat">
|
|
<span class="percent">
|
|
0%
|
|
</span>
|
|
<span class="absValue">
|
|
(0/12)
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<br/>
|
|
<br/>
|
|
|
|
|
|
<pre>
|
|
<code class="sourceCode" id="sourceCode"> package it.polimi.ingsw.gc14;
|
|
|
|
/** Enumeration of error types that can be returned by server-side operations. */
|
|
<b class="nc"> public enum ErrorType {</b>
|
|
/** The chosen username is already taken by another connected player. */
|
|
<b class="nc"> INVALID_USERNAME("Username is already in use or too long"),</b>
|
|
/** The user is already connected to the server. */
|
|
<b class="nc"> USER_ALREADY_CONNECTED("User is already connected"),</b>
|
|
/** The requested number of players is outside the allowed range. */
|
|
<b class="nc"> WRONG_PLAYER_NUMBER("Wrong player number"),</b>
|
|
/** The server has crashed or become unreachable. */
|
|
<b class="nc"> SERVER_CRASHED("Server crashed"),</b>
|
|
/** The server is unreachable. */
|
|
<b class="nc"> SERVER_UNREACHABLE("Server unreachable"),</b>
|
|
/** A generic, unclassified error occurred. */
|
|
<b class="nc"> GENERIC_ERROR("Generic error"),</b>
|
|
/** The game has already started and cannot accept new players. */
|
|
<b class="nc"> GAME_ALREADY_STARTED("Game already started"),</b>
|
|
/** The action attempted is not valid in the current game state. */
|
|
<b class="nc"> WRONG_ACTION("Wrong action");</b>
|
|
/** Human-readable description of this error, returned by {@link #toString()}. */
|
|
private final String description;
|
|
|
|
/**
|
|
* Creates an error type constant with the given human-readable description.
|
|
*
|
|
* @param description the message returned by {@link #toString()}.
|
|
*/
|
|
<b class="nc"> ErrorType(String description) {</b>
|
|
<b class="nc"> this.description = description;</b>
|
|
}
|
|
|
|
/**
|
|
* Returns the human-readable description of this error.
|
|
*
|
|
* @return the error description string.
|
|
*/
|
|
@Override
|
|
public String toString() {
|
|
<b class="nc"> return description;</b>
|
|
}
|
|
}
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
(function() {
|
|
var msie = false, msie9 = false;
|
|
/*@cc_on
|
|
msie = true;
|
|
@if (@_jscript_version >= 9)
|
|
msie9 = true;
|
|
@end
|
|
@*/
|
|
|
|
if (!msie || msie && msie9) {
|
|
hljs.highlightAll()
|
|
hljs.initLineNumbersOnLoad();
|
|
}
|
|
})();
|
|
</script>
|
|
|
|
<div class="footer">
|
|
|
|
<div style="float:right;">generated on 2026-06-19 22:53</div>
|
|
</div>
|
|
</body>
|
|
</html>
|