Skip to content

Commit

Permalink
Refactor exception handling in serialization context
Browse files Browse the repository at this point in the history
Replaced ParseException with ParserException in TagSerializationContext for more accurate exception handling. Also, updated the project version from 2.2.8 to 2.2.9.
  • Loading branch information
NonSwag committed Oct 31, 2024
1 parent 9d0887d commit 93446ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion nbt/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group = "net.thenextlvl.core"
version = "2.2.8"
version = "2.2.9"

java {
toolchain.languageVersion = JavaLanguageVersion.of(21)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import org.jspecify.annotations.Nullable;

import java.lang.reflect.Type;
import java.text.ParseException;

/**
* TagSerializationContext defines the contract for serializing objects into tags.
Expand All @@ -19,7 +18,7 @@ public interface TagSerializationContext {
* @throws ParserException if an error occurs during serialization
*/
@NonNull
Tag serialize(@Nullable Object object) throws ParseException;
Tag serialize(@Nullable Object object) throws ParserException;

/**
* Serializes the given object into a Tag representation based on the specified type.
Expand All @@ -30,5 +29,5 @@ public interface TagSerializationContext {
* @throws ParserException if an error occurs during serialization
*/
@NonNull
Tag serialize(@Nullable Object object, @NonNull Type type) throws ParseException;
Tag serialize(@Nullable Object object, @NonNull Type type) throws ParserException;
}

0 comments on commit 93446ac

Please sign in to comment.