-
Notifications
You must be signed in to change notification settings - Fork 0
API Host AuroraCompilationException
包含一条或多条脚本编译诊断信息的异常。
Exception containing one or more script compilation diagnostics.
命名空间:AuroraScript。类型:class。
Namespace:
AuroraScript. Kind: class.
Purpose
AuroraCompilationException 是公开宿主类型。通过下方签名选择调用方式;对运行时对象、生命周期和异常,应由宿主在边界处明确处理。
Exception containing one or more script compilation diagnostics.
Simple Example
下面是 AuroraCompilationException 的最小使用方式。
A minimal use of
AuroraCompilationException.
try
{
await engine.BuildAsync("main.as");
}
catch (AuroraCompilationException ex)
{
foreach (var diagnostic in ex.Diagnostics)
Console.Error.WriteLine(diagnostic);
}Members
创建 AuroraCompilationException 实例。
Use the member according to its public signature.
Parameters:
-
diagnostics
按签名提供的IEnumerable<AuroraCompilationDiagnostic>参数。The
IEnumerable<AuroraCompilationDiagnostic>parameter required by the signature.
Returns
新建的 AuroraCompilationException 实例。
A new
AuroraCompilationExceptioninstance.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
var value = new AuroraCompilationException(/* 参数 */);读取 Diagnostics 属性。
Use the member according to its public signature.
Parameters:
- 无。
None.
Returns
返回 IReadOnlyList<AuroraCompilationDiagnostic>。
Returns
IReadOnlyList<AuroraCompilationDiagnostic>.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
AuroraCompilationException value = /* 从宿主 API 获取实例 */;
var current = value.Diagnostics;读取 Count 属性。
Use the member according to its public signature.
Parameters:
- 无。
None.
Returns
返回 int。
Returns
int.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
AuroraCompilationException value = /* 从宿主 API 获取实例 */;
var current = value.Count;读取 FirstDiagnostic 属性。
Use the member according to its public signature.
Parameters:
- 无。
None.
Returns
返回 AuroraCompilationDiagnostic。
Returns
AuroraCompilationDiagnostic.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
AuroraCompilationException value = /* 从宿主 API 获取实例 */;
var current = value.FirstDiagnostic;读取 FileName 属性。
Use the member according to its public signature.
Parameters:
- 无。
None.
Returns
返回 string。
Returns
string.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
AuroraCompilationException value = /* 从宿主 API 获取实例 */;
var current = value.FileName;读取 LineNumber 属性。
Use the member according to its public signature.
Parameters:
- 无。
None.
Returns
返回 int。
Returns
int.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
AuroraCompilationException value = /* 从宿主 API 获取实例 */;
var current = value.LineNumber;读取 ColumnNumber 属性。
Use the member according to its public signature.
Parameters:
- 无。
None.
Returns
返回 int。
Returns
int.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
AuroraCompilationException value = /* 从宿主 API 获取实例 */;
var current = value.ColumnNumber;调用 ToString 完成其公开操作。
Use the member according to its public signature.
Parameters:
- 无。
None.
Returns
返回 string。
Returns
string.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
AuroraCompilationException value = /* 从宿主 API 获取实例 */;
var result = value.ToString();AuroraScript.JIT 4.0.0 · Documentation Home · Repository · MIT License