@@ -0,0 +1,2520 @@
+/*%0A * Copyright (c) 2018, Lotto %3Chttps://github.com/devLotto%3E%0A * All rights reserved.%0A *%0A * Redistribution and use in source and binary forms, with or without%0A * modification, are permitted provided that the following conditions are met:%0A *%0A * 1. Redistributions of source code must retain the above copyright notice, this%0A *    list of conditions and the following disclaimer.%0A * 2. Redistributions in binary form must reproduce the above copyright notice,%0A *    this list of conditions and the following disclaimer in the documentation%0A *    and/or other materials provided with the distribution.%0A *%0A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS %22AS IS%22 AND%0A * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED%0A * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE%0A * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR%0A * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES%0A * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;%0A * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND%0A * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT%0A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS%0A * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.%0A */%0Apackage net.runelite.mixins;%0A%0Aimport net.runelite.api.mixins.Copy;%0Aimport net.runelite.api.mixins.Mixin;%0Aimport net.runelite.api.mixins.Replace;%0Aimport net.runelite.rs.api.RSClient;%0Aimport net.runelite.rs.api.RSRunException;%0A%0A@Mixin(RSClient.class)%0Apublic abstract class ProcessClientErrorMixin implements RSClient%0A%7B%0A%09@Copy(%22processClientError%22)%0A%09static void rs$processClientError(String string, Throwable throwable)%0A%09%7B%0A%09%09throw new RuntimeException();%0A%09%7D%0A%0A%09@Replace(%22processClientError%22)%0A%09static void rl$processClientError(String string, Throwable throwable)%0A%09%7B%0A%09%09if (throwable != null)%0A%09%09%7B%0A%09%09%09Throwable throwableToScan = throwable;%0A%0A%09%09%09if (throwable instanceof RSRunException)%0A%09%09%09%7B%0A%09%09%09%09throwableToScan = ((RSRunException) throwable).getParent();%0A%09%09%09%7D%0A%0A%09%09%09throwableToScan.printStackTrace();%0A%0A%09%09%09StackTraceElement%5B%5D stackTrace = throwableToScan.getStackTrace();%0A%0A%09%09%09for (StackTraceElement stackTraceElement : stackTrace)%0A%09%09%09%7B%0A%09%09%09%09// If stack trace contains %22runelite%22, don't send it%0A%09%09%09%09if (stackTraceElement.getClassName().contains(%22runelite%22))%0A%09%09%09%09%7B%0A%09%09%09%09%09return;%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%0A%09%09rs$processClientError(string, throwable);%0A%09%7D%0A%7D%0A

add mixin for processing game exceptions