All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dslplatform.json.ParsingException Maven / Gradle / Ivy

There is a newer version: 1.52.1
Show newest version
package com.dslplatform.json;

import java.io.IOException;

public class ParsingException extends IOException {

	private ParsingException(String reason) {
		super(reason);
	}

	private ParsingException(String reason, Throwable cause) {
		super(reason, cause);
	}

	public static ParsingException create(String reason, boolean withStackTrace) {
		return withStackTrace
				? new ParsingException(reason)
				: new ParsingStacklessException(reason);
	}


	public static ParsingException create(String reason, Throwable cause, boolean withStackTrace) {
		return withStackTrace
				? new ParsingException(reason, cause)
				: new ParsingStacklessException(reason, cause);
	}

	private static class ParsingStacklessException extends ParsingException {

		private ParsingStacklessException(String reason) {
			super(reason);
		}

		private ParsingStacklessException(String reason, Throwable cause) {
			super(reason, cause);
		}

		@Override
		public synchronized Throwable fillInStackTrace() {
			return this;
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy