mirror of
https://github.com/AssetRipper/MeshSharp.git
synced 2026-11-13 12:41:28 -10:00
39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace AssetRipper.MeshSharp.FBX.Exceptions
|
|
{
|
|
/// <summary>
|
|
/// An error with the FBX data input
|
|
/// </summary>
|
|
public class FbxException : Exception
|
|
{
|
|
/// <summary>
|
|
/// An error at a binary stream offset
|
|
/// </summary>
|
|
/// <param name="position"></param>
|
|
/// <param name="message"></param>
|
|
public FbxException(long position, string
|
|
message) : base($"{message}, near offset {position}") { }
|
|
|
|
/// <summary>
|
|
/// An error in a text file
|
|
/// </summary>
|
|
/// <param name="line"></param>
|
|
/// <param name="column"></param>
|
|
/// <param name="message"></param>
|
|
public FbxException(int line, int column, string message) :
|
|
base($"{message}, near line {line} column {column}")
|
|
{ }
|
|
|
|
/// <summary>
|
|
/// An error in a node object
|
|
/// </summary>
|
|
/// <param name="nodePath"></param>
|
|
/// <param name="propertyID"></param>
|
|
/// <param name="message"></param>
|
|
public FbxException(Stack<string> nodePath, int propertyID, string message)
|
|
: base(message + ", at " + string.Join("/", nodePath.ToArray()) + (propertyID < 0 ? "" : $"[{propertyID}]")) { }
|
|
}
|
|
}
|