mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-03-30 21:05:58 -05:00
Make missing TR mapping namespace throw an exception instead of printing to stderr
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package net.fabricmc.loom.util.srg;
|
||||
package net.fabricmc.loom.util;
|
||||
|
||||
/**
|
||||
* An exception that occurs when processing obfuscation mappings.
|
||||
@@ -155,7 +155,10 @@ public final class TinyRemapperHelper {
|
||||
final int toId = mappings.getNamespaceId(to);
|
||||
|
||||
if (toId == MappingTreeView.NULL_NAMESPACE_ID) {
|
||||
System.out.println("Warning: Trying to remap to unknown namespace: " + to);
|
||||
throw new MappingException(
|
||||
"Trying to remap from '%s' (id: %d) to unknown namespace '%s'. Available namespaces: [%s -> %s]"
|
||||
.formatted(from, fromId, to, mappings.getSrcNamespace(), String.join(", ", mappings.getDstNamespaces()))
|
||||
);
|
||||
}
|
||||
|
||||
for (MappingTree.ClassMapping classDef : mappings.getClasses()) {
|
||||
|
||||
@@ -42,6 +42,7 @@ import com.google.common.collect.ListMultimap;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import net.fabricmc.loom.api.mappings.layered.MappingsNamespace;
|
||||
import net.fabricmc.loom.util.MappingException;
|
||||
import net.fabricmc.loom.util.function.CollectionUtil;
|
||||
import net.fabricmc.mappingio.FlatMappingVisitor;
|
||||
import net.fabricmc.mappingio.MappingReader;
|
||||
|
||||
Reference in New Issue
Block a user