Skip to content

BaseWrappedException.GuestLocation ​

com.jsmacrosce.jsmacros.core.language.BaseWrappedException.GuestLocation

A guest-source location retaining the supplied file and diagnostic positions.

js
const GuestLocation = Java.type("com.jsmacrosce.jsmacros.core.language.BaseWrappedException$GuestLocation");  
Chat.log(new GuestLocation(null, 0, 0, 1, -1).toString());

Nested type declared in BaseWrappedException.

Constructors ​

new BaseWrappedException.GuestLocation ​

new BaseWrappedException.GuestLocation(File file, int startIndex, int endIndex, int line, int column)#
Stores the supplied file and diagnostic positions unchanged.

Parameters:

  • file: source file, or null when unknown
  • startIndex: supplied source-start offset
  • endIndex: supplied source-end offset
  • line: supplied diagnostic line number
  • column: supplied diagnostic column; -1 denotes an unknown column

Fields ​

column ​

column: intread-only#
Supplied diagnostic column; -1 denotes an unknown column.

endIndex ​

endIndex: intread-only#
Supplied source-end offset.

file ​

file: Fileread-only#
Source file, or null when unknown.

line ​

line: intread-only#
Supplied diagnostic line number.

startIndex ​

startIndex: intread-only#
Supplied source-start offset.

Methods ​

toString ​

toString(): String#
Returns diagnostic text using the file name, line, and column; a null file is shown as unknown, and column -1 as ?.
Returns: diagnostic file/line/column text