Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slight Exception message changes #7116

Open
wants to merge 6 commits into
base: dev/patch
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/main/java/ch/njol/skript/Skript.java
Original file line number Diff line number Diff line change
Expand Up @@ -1678,6 +1678,7 @@ public static EmptyStacktraceException exception(@Nullable Throwable cause, fina
}

String issuesUrl = "https://github.com/SkriptLang/Skript/issues";
String downloadUrl = "https://github.com/SkriptLang/Skript/releases/latest";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be better to grab this from the update checker

Though I don't think the update checker currently records this for GitHub, so a TODO comment would suffice for now

Copy link
Contributor Author

@Asleeepp Asleeepp Oct 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't using releases/latest (like it is currently) suffice for this? I don't see the difference it would make.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just mean that the update checker might not always point to GitHub (e.g. in the future it could recommend Spigot if that's where you downloaded Skript from)


logEx();
logEx("[Skript] Severe Error:");
Expand Down Expand Up @@ -1714,13 +1715,12 @@ public static EmptyStacktraceException exception(@Nullable Throwable cause, fina
logEx("");
logEx("Again, we do not support Minecraft versions this old.");
} else if (!serverPlatform.supported){
logEx("Your server platform appears to be unsupported by Skript. It might not work reliably.");
logEx("You can report this at " + issuesUrl + ". However, we may be unable to fix the issue.");
logEx("Your server platform appears to be unsupported by Skript. The plugin may not function correctly.");
logEx("It is recommended that you switch to Paper or Spigot, should you encounter more problems.");
} else if (updater != null && updater.getReleaseStatus() == ReleaseStatus.OUTDATED) {
logEx("You're running outdated version of Skript! Please try updating it NOW; it might fix this.");
logEx("Run /sk update check to get a download link to latest Skript!");
logEx("You will be given instructions how to report this error if it persists after update.");
logEx("You're running an outdated version of Skript! Please try updating it NOW; it might fix this issue.");
logEx("Visit " + downloadUrl + " for the latest version of Skript.");
logEx("You will be given instructions on how to report this error if it persists after the update.");
} else {
logEx("Something went horribly wrong with Skript.");
logEx("This issue is NOT your fault! You probably can't fix it yourself, either.");
Expand All @@ -1741,9 +1741,9 @@ public static EmptyStacktraceException exception(@Nullable Throwable cause, fina
pluginsMessage.append(" ");
}
logEx(pluginsMessage.toString());
logEx("We could not identify which of those are specially related, so this might also be Skript issue.");
logEx("We could not identify which of those are specially related, so this might also be a Skript issue.");
} else {
logEx("Following plugins are probably related to this error in some way:");
logEx("The following plugins are most likely related to this error in some way:");
StringBuilder pluginsMessage = new StringBuilder();
for (PluginDescriptionFile desc : stackPlugins) {
pluginsMessage.append(desc.getName());
Expand All @@ -1757,9 +1757,9 @@ public static EmptyStacktraceException exception(@Nullable Throwable cause, fina
}

logEx("You should try disabling those plugins one by one, trying to find which one causes it.");
logEx("If the error doesn't disappear even after disabling all listed plugins, it is probably Skript issue.");
logEx("If the error doesn't disappear even after disabling all listed plugins, it is probably a Skript issue.");
logEx("In that case, you will be given instruction on how should you report it.");
logEx("On the other hand, if the error disappears when disabling some plugin, report it to author of that plugin.");
logEx("On the other hand, if the error disappears after disabling another plugin, report it to author of that plugin.");
logEx("Only if the author tells you to do so, report it to Skript's issue tracker.");
}
}
Expand Down