17 using System.Runtime.CompilerServices;
26 public static partial class Messages
36 [MethodImpl(MethodImplOptions.AggressiveInlining)]
39 return $
"The dynamic-link library for {dllName} could not be found. " +
40 "Please visit https://github.com/QuantConnect/Lean/blob/master/Algorithm.Python/readme.md for instructions " +
41 $
"on how to enable python support in {platform}";
64 [MethodImpl(MethodImplOptions.AggressiveInlining)]
67 var message =
"Trying to include an invalid token/character in any statement throws a SyntaxError exception. " +
68 "To prevent the exception, ensure no invalid token are mistakenly included (e.g: leading zero).";
69 var errorLine = exception.Message.GetStringBetweenChars(
'(',
')');
71 return $
"{message}{Environment.NewLine} in {errorLine}{Environment.NewLine}";
84 [MethodImpl(MethodImplOptions.AggressiveInlining)]
87 return "Trying to retrieve an element from a collection using a key that does not exist " +
88 $
@"in that collection throws a KeyError exception. To prevent the exception, ensure that the {
89 key} key exist in the collection and/or that collection is not empty.";
107 [MethodImpl(MethodImplOptions.AggressiveInlining)]
110 return "Trying to dynamically access a method that does not exist throws a TypeError exception. " +
111 $
@"To prevent the exception, ensure each parameter type matches those required by the {
112 methodName} method. Please checkout the API documentation.";
124 [MethodImpl(MethodImplOptions.AggressiveInlining)]
127 return $
"In Scheduled Event '{eventName}',";
139 [MethodImpl(MethodImplOptions.AggressiveInlining)]
142 return $
"Loaded ExceptionInterpreter: {interpreter.GetType().Name}";
159 [MethodImpl(MethodImplOptions.AggressiveInlining)]
162 return $
@"Trying to perform a summation, subtraction, multiplication or division between {
163 types} objects throws a TypeError exception. To prevent the exception, ensure that both values share the same type.";