Files
Progetto-ingegneria-del-sof…/deliverables/Coverage/htmReport/ns-1/sources/source-3.html
T
2026-06-19 22:57:43 +02:00

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">&nbsp;package it.polimi.ingsw.gc14;
&nbsp;
&nbsp;/** Enumeration of error types that can be returned by server-side operations. */
<b class="nc">&nbsp;public enum ErrorType {</b>
&nbsp; /** The chosen username is already taken by another connected player. */
<b class="nc">&nbsp; INVALID_USERNAME(&quot;Username is already in use or too long&quot;),</b>
&nbsp; /** The user is already connected to the server. */
<b class="nc">&nbsp; USER_ALREADY_CONNECTED(&quot;User is already connected&quot;),</b>
&nbsp; /** The requested number of players is outside the allowed range. */
<b class="nc">&nbsp; WRONG_PLAYER_NUMBER(&quot;Wrong player number&quot;),</b>
&nbsp; /** The server has crashed or become unreachable. */
<b class="nc">&nbsp; SERVER_CRASHED(&quot;Server crashed&quot;),</b>
&nbsp; /** The server is unreachable. */
<b class="nc">&nbsp; SERVER_UNREACHABLE(&quot;Server unreachable&quot;),</b>
&nbsp; /** A generic, unclassified error occurred. */
<b class="nc">&nbsp; GENERIC_ERROR(&quot;Generic error&quot;),</b>
&nbsp; /** The game has already started and cannot accept new players. */
<b class="nc">&nbsp; GAME_ALREADY_STARTED(&quot;Game already started&quot;),</b>
&nbsp; /** The action attempted is not valid in the current game state. */
<b class="nc">&nbsp; WRONG_ACTION(&quot;Wrong action&quot;);</b>
&nbsp; /** Human-readable description of this error, returned by {@link #toString()}. */
&nbsp; private final String description;
&nbsp;
&nbsp; /**
&nbsp; * Creates an error type constant with the given human-readable description.
&nbsp; *
&nbsp; * @param description the message returned by {@link #toString()}.
&nbsp; */
<b class="nc">&nbsp; ErrorType(String description) {</b>
<b class="nc">&nbsp; this.description = description;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Returns the human-readable description of this error.
&nbsp; *
&nbsp; * @return the error description string.
&nbsp; */
&nbsp; @Override
&nbsp; public String toString() {
<b class="nc">&nbsp; return description;</b>
&nbsp; }
&nbsp;}
</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>