mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 07:04:52 +09:00
Check if Factorio terminated as a result of SIGKILL and throw an error suggesting the system may be low on memory as a cause. Also print exit code if the unexpected shutdown occured without a signal.
25 lines
482 B
JavaScript
25 lines
482 B
JavaScript
/**
|
|
* Errors thrown in Clusterio
|
|
* @module
|
|
*/
|
|
|
|
class CommandError extends Error { }
|
|
class RequestError extends Error { }
|
|
|
|
// Signal for messages that fail validation
|
|
class InvalidMessage extends Error { }
|
|
|
|
// Errror class for known errors occuring during startup
|
|
class StartupError extends Error { }
|
|
|
|
// Errors outside of our control.
|
|
class EnvironmentError extends Error { }
|
|
|
|
module.exports = {
|
|
CommandError,
|
|
RequestError,
|
|
InvalidMessage,
|
|
StartupError,
|
|
EnvironmentError,
|
|
}
|