MCPcopy Index your code
hub / github.com/pex-tool/pex / LaunchError

Class LaunchError

pex/http/server.py:128–146  ·  view source on GitHub ↗

Indicates an error launching the server.

Source from the content-addressed store, hash-verified

126# after construction in some cases.
127@attr.s
128class LaunchError(Exception):
129 """Indicates an error launching the server."""
130
131 log = attr.ib() # type: str
132 additional_msg = attr.ib(default=None) # type: Optional[str]
133 verbose = attr.ib(default=False) # type: bool
134
135 def __str__(self):
136 # type: () -> str
137 lines = ["Error launching server."]
138 if self.additional_msg:
139 lines.append(self.additional_msg)
140 if self.verbose:
141 lines.append("Contents of the server log:")
142 with open(self.log) as fp:
143 lines.extend(fp.read().splitlines())
144 else:
145 lines.append("See the log at {log} for more details.".format(log=self.log))
146 return "\n".join(lines)
147
148
149@attr.s(frozen=True)

Callers 1

launchMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected