# 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](BaseWrappedException.md).

## Constructors

### new BaseWrappedException.GuestLocation {#com.jsmacrosce.jsmacros.core.language.BaseWrappedException.GuestLocation_constructor-File-int-int-int-int-}

```js
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 {#com.jsmacrosce.jsmacros.core.language.BaseWrappedException.GuestLocation_column}

```js
column: int
```

Supplied diagnostic column; `-1` denotes an unknown column.

### endIndex {#com.jsmacrosce.jsmacros.core.language.BaseWrappedException.GuestLocation_endIndex}

```js
endIndex: int
```

Supplied source-end offset.

### file {#com.jsmacrosce.jsmacros.core.language.BaseWrappedException.GuestLocation_file}

```js
file: File
```

Source file, or `null` when unknown.

### line {#com.jsmacrosce.jsmacros.core.language.BaseWrappedException.GuestLocation_line}

```js
line: int
```

Supplied diagnostic line number.

### startIndex {#com.jsmacrosce.jsmacros.core.language.BaseWrappedException.GuestLocation_startIndex}

```js
startIndex: int
```

Supplied source-start offset.

## Methods

### toString {#com.jsmacrosce.jsmacros.core.language.BaseWrappedException.GuestLocation_toString-}

```js
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
