Skip to content

Commit

Permalink
Fix null reference in ErrorResponseMessage.ToString()
Browse files Browse the repository at this point in the history
  • Loading branch information
pierre3 committed Mar 4, 2018
1 parent 44623cc commit 57e4239
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
8 changes: 5 additions & 3 deletions Line.Messaging/Exceptions/ErrorResponseMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ public class ErrorResponseMessage
public IList<ErrorDetails> Details { get; set; }

public ErrorResponseMessage()
{ }
{
}

public override string ToString()
{
return $"{Message},[{string.Join(",", Details)}]";
return (Details == null) ? Message : $"{Message},[{string.Join(",", Details)}]";
}

/// <summary>
Expand All @@ -42,7 +43,8 @@ public class ErrorDetails
public string Property { get; set; }

public ErrorDetails()
{ }
{
}

public override string ToString()
{
Expand Down
28 changes: 15 additions & 13 deletions Line.Messaging/Line.Messaging.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,37 @@
<Authors>pierre3, kenamanu</Authors>
<Company></Company>
<Product>Line Messaging API</Product>
<Description>Line Messaging API for .Net</Description>
<Description>SDK for the LINE Messaging API for C#</Description>
<Version>1.2.3</Version>
<Copyright2017 pierre3</Copyright>
<Copyright2018 pierre3</Copyright>
<PackageLicenseUrl>https://github.com/pierre3/LineMessagingApi/blob/master/LICENSE</PackageLicenseUrl>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageTags>Line Messaging API;line;bot</PackageTags>
<PackageProjectUrl>https://github.com/pierre3/LineMessagingApi/</PackageProjectUrl>
<IncludeSymbols>true</IncludeSymbols>
<RepositoryUrl>https://github.com/pierre3/LineMessagingApi/</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageReleaseNotes>Supports API update at 2018-02-08 and 2018-02-22.
( Refer to https://developers.line.me/en/docs/messaging-api/release-notes/ )
<PackageReleaseNotes>Supports API update at 2018-02-08 and 2018-02-22
( https://developers.line.me/en/docs/messaging-api/release-notes/ )

1. Default actions can now be set for template messages

2. displayText property for postback actions released
- We have released the displayText property and have deprecated the text property for postback actions. We recommend using displayText instead of the text property.
- (Breaking change) In the constructor of PostbackTemplateAction, the value of the text parameter is now set to the DisplayText property by default.
- We have released the displayText property and have deprecated the text property for postback actions.
We recommend using displayText instead of the text property.
- (Breaking changes) In the constructor of PostbackTemplateAction,
the value of the text parameter is now set to the DisplayText property by default.
If you want to use the Text property as before, please set "useDisplayText" parameter to "false".
//Use the DisplayText property
PostbackTemplateAction("label", "data", "text");

//Use the DisplayText property
PostbackTemplateAction("label", "data", "text");

//Use the Text property (Behavior of previous versions)
PostbackTemplateAction("label", "data", "text", useDisplayText : false);
PostbackTemplateAction("label", "data", "text", useDisplayText : false);

3. Property for accessibility released
- Now you can specify text to be spoken using the label property for imagemap messages and rich menus when the accessibility feature is enabled on the client device.
This feature is supported on LINE iOS version 8.2.0 and later.</PackageReleaseNotes>
This feature is supported on LINE iOS version 8.2.0 and later.</PackageReleaseNotes>
<AssemblyVersion>1.2.3.0</AssemblyVersion>
<FileVersion>1.2.3.0</FileVersion>
</PropertyGroup>
Expand Down

0 comments on commit 57e4239

Please sign in to comment.